Skip to content

ProductPriceRangeAggregation

The ProductPriceRangeAggregation aggregates search results by the value of the product's price.

Arguments

  • name - name of the Aggregation
  • currencyCode - currency code of the price
  • ranges - array of Range objects that define the borders of the specific range sets

Example

1
2
3
4
5
6
7
$query = new ProductQuery();
$query->setAggregations([
    new ProductPriceRangeAggregation('price', 'PLN', [
        new \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\Range(0, 10000),
        new \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\Range(10000, null),
    ]),
]);