Build ES aggregations from search request buckets.
public buildAggregations ( array $buckets = [] ) : array | ||
$buckets | array | Bucket to be converted into ES aggregations |
return | array |
/** * 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; }