Faceting with Distinct Attribute #820
MarinaPilipovicFB
started this conversation in
Feedback & Feature Proposal
Replies: 1 comment 1 reply
-
Hi @MarinaPilipovicFB, thanks for taking the time to open the discussion! Your use case is definitely valid. While we haven’t planned to implement this just yet, I've discussed it with the team, and we believe it might be a good fit as a future search parameter. Would that work for you? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone,
I’ve already discussed this topic with Caro on Discord, and she suggested that it would be best to open a discussion here as well.
I’m a backend developer working in a product company, and we use a self-hosted Meilisearch setup. We encountered an issue when trying to filter and display the count of results for each filter option.
In our searches, we always use the distinct attribute due to the nature of our business. We wanted to use facets to retrieve counts for all filter options, but we ran into a problem: the distinct operation is applied before faceting.
To better illustrate our use case, here’s an example:
Our document structure looks like this:
And our index contains the following records:
The
distinct attribute
ishotel_id
. Given this dataset, I expect the facets to return:However, with my current query, I get the following result:
Caro explained that this is the expected behavior and that what I’m trying to achieve is currently not possible.
I’m curious if there are any plans or ideas to support this kind of functionality in Meilisearch. This seems like a feature that could bring significant value to other businesses as well.
Looking forward to your thoughts!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions