🧪 Search for facet values #515
Replies: 8 comments 8 replies
-
It would help if you allowed a toggle in the search settings for each index, to allow for facet hits with search hits. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋, 🔔 EDIT: A new prototype version is accessible here 🔔 Here is the current prototype you can use to test the new Search for Facet Values feature:
You can use the feature this way or look at the original PR for more info: # send some documents in your database
cat movies.json | xh 'localhost:7700/indexes/movies/documents' 'content-type:application/json'
# Make your facet filterable
echo '{ "filterableAttributes": ["genres"] }' | xh PATCH 'localhost:7700/indexes/movies/settings'
# Do your query to search for facets
echo '{"q": "spiderman", "filter": "price > 10", "facetName": "genres", "facetQuery": "act" }' | xh 'localhost:7700/indexes/movies/facet-search'
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋, 🔔 EDIT: A new prototype version is accessible here 🔔 Yes! The second prototype is already here! You can test the new Search for Facet Values feature:
You can use the feature this way or look at the original PR for more info: # send some documents in your database
cat movies.json | xh 'localhost:7700/indexes/movies/documents' 'content-type:application/json'
# Make your facet filterable
echo '{ "filterableAttributes": ["genres"] }' | xh PATCH 'localhost:7700/indexes/movies/settings'
# Do your query to search for facets
echo '{"q": "spiderman", "filter": "price > 10", "facetName": "genres", "facetQuery": "act" }' | xh 'localhost:7700/indexes/movies/facet-search' In this new version we fixed a lot of issues regarding error codes and the output JSON object.
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋, 🔔 EDIT: A new prototype version is accessible here 🔔 Yes! The third prototype is already here! You can test the new Search for Facet Values feature:
You can use the feature this way or look at the original PR for more info: # send some documents in your database
cat movies.json | xh 'localhost:7700/indexes/movies/documents' 'content-type:application/json'
# Make your facet filterable
echo '{ "filterableAttributes": ["genres"] }' | xh PATCH 'localhost:7700/indexes/movies/settings'
# Do your query to search for facets
echo '{"q": "spiderman", "filter": "price > 10", "facetName": "genres", "facetQuery": "act" }' | xh 'localhost:7700/indexes/movies/facet-search' This version makes the search for facet values route follow the
|
Beta Was this translation helpful? Give feedback.
-
Is the facetName only allowed to have one? What happen if I want to query "genres" and "age"?
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋 We released a new prototype for the search for facet values. Introduced changes
How to run the prototype?You need to start from a fresh new database (remove the previous used data.ms) and use the following Docker image: docker run -it --rm -p 7700:7700 -v $(pwd)/meili_data:/meili_data getmeili/meilisearch:prototype-search-for-facet-values-6 How to use the prototype?# send some documents in your database
cat movies.json | xh 'localhost:7700/indexes/movies/documents' 'content-type:application/json'
# Make your facet filterable
echo '{ "filterableAttributes": ["genres"] }' | xh PATCH 'localhost:7700/indexes/movies/settings'
# Do your query to search for facets
echo '{"q": "spiderman", "filter": "price > 10", "facetName": "genres", "facetQuery": "act" }' | xh 'localhost:7700/indexes/movies/facet-search'
|
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋 We have just released the first RC (release candidate) of Meilisearch containing this new feature! docker run -it --rm -p 7700:7700 -v $(pwd)/meili_data:/meili_data getmeili/meilisearch:v1.3.0-rc.0 You are welcome to leave your feedback in this discussion. If you encounter any bugs, please report them here. 🎉 The official and stable release containing this change will be available on July 31st, 2023 |
Beta Was this translation helpful? Give feedback.
-
Hey folks 👋 v1.3 has been released! 🦁 You can now search for facet values and sort them by count ✨ 📚 https://www.meilisearch.com/docs/learn/fine_tuning_results/faceted_search |
Beta Was this translation helpful? Give feedback.
-
Currently, there is no way to natively search for a facet value among a distributed facet, which can be significant depending on the dataset. Some facets can hold hundreds or thousands of values.
Introducing a search for facet values feature would allow end-users to discover and search for specific facet values that match their needs and thus speed up their finding.
We want to enable you to quickly implement that type of faceted search experience in a few lines of code.
We have planned to work on the first iteration for v1.2, and a prototype should be available in the next few weeks.
This prototype should provide the ability to search in facets using prefix search while being typo tolerant.
It will also allow injecting global search parameters to allow to find facets that match according to the current search context (e.g., query terms, filters, etc..)
Fields defined as
filterableAttributes
will be facet searchable without further configuration on the engine side.Our research has permitted us to discover some grey areas for which we would like to evaluate the degree of importance to define better if this first iteration is sufficient and to prepare successive iterations on this feature.
We have listed the questions we would like your feedback on to assess your needs better.
filterableAttributes
distributed as facets impossible to be searched on as facet?Do you see anything we may miss?
Thank you for your feedback!
You can also share your feedback on the related discord community discussion if you prefer.
Beta Was this translation helpful? Give feedback.
All reactions