private function prepareAggregations(array $searchResponse, AggregationFactory $aggregationFactory)
    {
        $aggregations = [];

        if (isset($searchResponse['aggregations'])) {
            $aggregations = $searchResponse['aggregations'];
        }

        $this->aggregations = $aggregationFactory->create($aggregations);
    }
private function prepareAggregations(array $searchResponse, AggregationFactory $aggregationFactory)
    {
        $aggregations = [];

        if (isset($searchResponse['aggregations'])) {
            $aggregations = $searchResponse['aggregations'];
        }

        $this->aggregations = $aggregationFactory->create($aggregations);
    }
private function prepareAggregations ( array $ searchResponse , AggregationFactory $ aggregationFactory ) { $ aggregations = [ ] ; if ( isset ( $ searchResponse [ 'aggregations' ] ) ) { $ aggregations = $ searchResponse [ 'aggregations' ] ; } $ this -> aggregations = $ aggregationFactory -> create ( $ aggregations ) ; }
Build buckets from raw search response.

@param array              $searchResponse     Engine raw search response.
@param AggregationFactory $aggregationFactory Aggregation factory.

@return void
Build buckets from raw search response .