PHP Class Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Request\Aggregation\Builder

Author: Aurelien FOUCRET ([email protected])
Show file Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Framework\ObjectManagerInterface $objectManager, Builder $queryBuilder ) Constructor.
buildAggregations ( array $buckets = [] ) : array Build ES aggregations from search request buckets.

Private Methods

Method Description
getBuilder ( string $bucketType ) : object Retrieve the builder used to convert a bucket into ES aggregation.

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Framework\ObjectManagerInterface $objectManager, Builder $queryBuilder )
$objectManager Magento\Framework\ObjectManagerInterface Object manager instance.
$queryBuilder Smile\ElasticsuiteCore\Search\Adapter\Elasticsuite\Request\Query\Builder Query builder used to build queries inside sort orders.

buildAggregations() public method

Build ES aggregations from search request buckets.
public buildAggregations ( array $buckets = [] ) : array
$buckets array Bucket to be converted into ES aggregations
return array