I am looking for a solution to get aggregations, one of each field, but apply different query conditions at different aggregations.
I have a collection of products, which has attributes: type, color, brand.
User selected: brand=Gap, color=White, and type=Sandal. To display the counts of the various similar products of at each aggregation:
- Query condition for
brandaggregation :color=White, andtype=Sandal - Query condition for
coloraggregation:brand=Gap, andtype=Sandal - Query condition for
typeaggregation:brand=Gap, andcolor=White
Can this be done in a single ElasticSearch query?