Currently facets are terms queries, but it is not adapted to all situations, we might want histograms (to render as range), significant_terms, etc.
Proposed solution
I propose:
in configuration, to change the bucket_agg from a boolean to a string specifying agg type. We could even have a dict to propose more than one type in some case (eg a facet categories_tags.significants for significant terms, or maybe we specify it in the request)
we may have to change filter analysis to retrieve selected values (whatever it means)
we have to develop the specific widgets
Forseen facets:
range for nutrients
significants terms are worth trying for categories
### Tasks
- [ ] Enable using a term facet with significant_terms aggregation (API + webcomponent)
- [ ] https://github.com/openfoodfacts/search-a-licious/issues/182
- [ ] facets with some values associated with images (eg. ecoscore logo)
What
Proposed solution
I propose:
Forseen facets:
Part of
62