This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Description
While trying to use SearchQuery to build queries for custom entities, it does not provide a way for me to add aggregations to the queries. Previously when using bodyBuilder we were requesting aggregations on certain queries for custom entity types using query = query.aggregation('terms', 'ratings.value') for example (for reviews/ratings in this example). However, I can't accomplish this aggregation using SearchQuery.
I see that aggregations are added in the core code of SearchQuery to add aggregations under a very specific condition (specifically must be in 'catalog' scope), but there is no way to add our own aggregation requests.