public function create(array $rawAggregations)
    {
        $buckets = $this->getBuckets($rawAggregations);

        return $this->aggregationFactory->create(['buckets' => $buckets]);
    }
public function create(array $rawAggregations)
    {
        $buckets = $this->getBuckets($rawAggregations);

        return $this->aggregationFactory->create(['buckets' => $buckets]);
    }
public function create ( array $ rawAggregations ) { $ buckets = $ this -> getBuckets ( $ rawAggregations ) ; return $ this -> aggregationFactory -> create ( [ 'buckets' => $ buckets ] ) ; }
Build a aggregation object from the search engine response.

@param array $rawAggregations ES aggregations response.

@return \Magento\Framework\Search\Response\Aggregation
Build a aggregation object from the search engine response .