facetDistribution being limited by distinctAttribute does not always make sense #741
Replies: 2 comments 1 reply
-
Hey @chamby 👋 Thank you very much for the report. Unfortunately, the What do you think about this @meilisearch/product-team? Note that the distinct system is already computed at query time, the main complexity is the setting and API. |
Beta Was this translation helpful? Give feedback.
-
@Kerollmops Thanks for implementing support for this in meilisearch/meilisearch#4693 released in v1.9. Is there a straightforward way to have this search parameter set for the results but not the facets in instant-meilisearch? From a brief review meiliSearchParams seems to apply to all requests. |
Beta Was this translation helpful? Give feedback.
-
Right now
facetDistribution
is limited by the use ofdistinctAttribute
. The implementation makes sense but is not ideal from a user perspective.My use case matches Meilisearch's own example.
I only want to show distinct results based on a single graphic design but with many variants of color, material, and cut represented within that design. The faceted attributes will decide which result for each design is the most relevant. The following screenshot shows many color attributes in the result set.
If I narrow the search to precisely one distinct result the problem becomes more obvious. The
facetDistribution
is built from the distinct results ignoring that there are still many valid/possible results within the distinct design group. Other colors are still relevant for the color facet to report, but thedistinctAttribute
prevents this.Here are the results with the same search criteria when I disable the
distinctAttribute
. Now the facets show what I expect.Would it be possible for Meilisearch to return a
facetDistribution
that ignoresdistinctAttribute
? A user should be able to select purple and see the single result swap from red to purple as the relevancy changes.Beta Was this translation helpful? Give feedback.
All reactions