Experimental CONTAINS filter operators
#763
Replies: 10 comments 24 replies
|
Hello, I’ve been using the CONTAINS filter functionality for some time, as well as the new Federation feature in the current RC version (v1.10.0-rc.1). Personally, I would like to have a feature similar to the following: Performing a search on the same index for multiple content items and aggregating the returned results (with optional AND or OR logic):
POST /indexes/{indexUid}/multi-search
{
"queries": [
{
"q": "hello",
"attributesToSearchOn": ["header"]
"filter": "id < 100"
},
{
"q": "world",
"attributesToSearchOn": ["footer"]
"filter": "id > 0"
},
],
"offset": 0,
"limit": 20
}The key here is to simultaneously search on different attributes for different content(
|
|
This feature turns out to be very useful in our case! We are implementing a search UI with several fields, in order to let the user search for documents that have, say, "chaussier" in the New operators like STARTS_WITH and ENDS_WITH could be a nice complement to CONTAINS, but CONTAINS would still be relevant and useful. An SQL-like Something that I would love to have would be error tolerance (and maybe other "search" stuff) in filters on text fields. Or a way to do this kind of queries (checking different fields for different keywords) with regular search, which includes error tolerance, synonyms, etc. |
|
Hello everyone 👋 We have just released the first RC (release candidate) of Meilisearch containing the You are welcome to leave your feedback in this discussion. If you encounter any bugs, please report them here. 🎉 Official and stable release containing this change will be available on |
|
Hi, @macraig is CONTAINS available in the Javascript SDK? |
|
Hello everyone, I'm wondering how to handle CONTAINS with two or more words. Is the only way to use two separate filters with 'AND'? |
|
Hey folks 👋 v1.11 has been released! 🐿️ You can now use the STARTS WITH filter 🎉 Looking forward to your feedback! ✨ |
|
Yay! Next up: ENDS_WITH ? |
|
Hello people 👋, Is there a plan to make the CONTAINS operator a stable (non-experimental) feature in any upcoming versions? If so, do you know from which version it might be supported as a standard feature? |
|
...or any news on potentially adding Beider Morse Phonetic Matching (BMPM), as detailed above...? Pleeeeeease? |
|
Hey everyone, just a quick message to let you know that we fixed the performance issue with the The |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
CONTAINSfilter operatorsMeilisearch v1.10.0 (released on August 26, 2024) introduces a new
CONTAINSfilter operator.Experimental feature abstract
Enabling the experimental feature will make two new operators available, the
CONTAINSandSTARTS WITHones, while filtering on strings.The
CONTAINSone is similar to the SQLLIKEoperator used in that way%venture%and theSTARTS WITHone is like usingvent%.How to use the feature?
--experimental-contains-filteror call thePATCH /experimental-featurespassing"containsFilter": true./indexes/movies/searchroute with your parameters:💡 More information about
CONTAINSon its dedicated usage page.Why is this feature not stable yet?
The aspect we are most concerned about with this feature is search performance.
Indeed, it is possible that
CONTAINSperform poorly, given your dataset. The time to find the documents matching a query with these operators increases with the total number of bytes of all the facet values of all the documents in an index.We would like to hear your feedback on this feature, and we would also like your input on the following questions to help us decide on a go-no-go decision for the stabilization of that feature in the future:
qparameter to solve your need for aCONTAINSoperator, and if not, why?CONTAINSoperator, and if not, why?🗣️ You are welcome to give feedback or ask any question on its usage; we are eager to collect feedback on the feature
All reactions