This extends the standard magento request interface to append support of the following features :
- document types
- hits filtering not applied to aggregations (ElasicSearch root filters)
- sort order definition
/** * Extract and build aggregations of the search request. * * @param RequestInterface $request Search request. * * @return array */ private function getAggregations(RequestInterface $request) { $aggregations = []; if ($request->getAggregation()) { $aggregations = $this->aggregationBuilder->buildAggregations($request->getAggregation()); } return $aggregations; }