Policy for facet distribution #315
Replies: 2 comments 2 replies
-
Hi @gmourier ! As @bidoubiwa mentioned in here meilisearch/meilisearch-js-plugins#696 it seems that having the items returning 0 even a facet is not selected is not that useful. |
Beta Was this translation helpful? Give feedback.
-
In our use case, we do not like the meilisearch API not returning 0 facets. We want to show users to see 0 value facets as well so that they can select them. The hack provided by this PR only works when you first do a no filter search, if you directly use a URL with specific rules it would not showcase them as the client does not have anything to remember from. IMO the meilisearch API should always return 0 facets (or be configurable to return 0 facets) and the client could be configured to either display them or not. For example, displaying 0 facets allow a user to add But without 0 facets, the user is not even aware that a type |
Beta Was this translation helpful? Give feedback.
-
With
v0.21.0
version, we have removed facet distribution with 0 values matching the filters.Before the
v0.21
version, facets matching 0 documents after a filter were returned. We could propose an option to choose the desired behavior for the facet distribution.How would you interact with the API? What could the field be called at search? Could it be interesting to have it as an instance setting?
Beta Was this translation helpful? Give feedback.
All reactions