facetStats
for an attribute shouldn't take into account the filters on that attribute
#703
xamir82
started this conversation in
Feedback & Feature Proposal
Replies: 2 comments 1 reply
-
Hello @xamir82 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Pinging @meilisearch/devrel-team here since we have a user frustration that could be solved with content creation 😊 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The best example for this would be a
price
attribute and a price range slider on the front-end. When the user sets a min/max value on the range slider, and you send a query with the appropriate filter (e.g.price >= <min> AND price <= <max>
) to Meilisearch, Meilisearch returnsfacetStats
forprice
that's equal to the filter itself. This would be problematic for the front-end, because after the price range slider is updated to match the newfacetStats
, then the user can't change the min & max to greater values.It seems like you have noticed this problem yourselves in the the official E-commerce demo, where you are performing a multi-search, with two searches, the second one being a dummy search without the filters, and a limit of
1
, as a way of working around the very same issue:If you don't want to change the current behavior, I think this is certainly the kind of thing that's worth documenting.
Beta Was this translation helpful? Give feedback.
All reactions