Experimental feature:CONTAINS
and Prefix / Suffix filter operators
#544
Replies: 9 comments 24 replies
-
Wouldn't supporting regex expressions permits to do everything?
But it would also be possible to use regex syntax if needed. In what cases could you use a regex? Is it something that seems critical? |
Beta Was this translation helpful? Give feedback.
-
Any updates about that ? My use case is the following : I have a database of users with their past and current professional experiences, and I need to do a filter with it. Like someone woking on a company called %companyName%. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋, Here is the current prototype you can use to test the new 💬 Current state of that featureThe aspect we are most concerned about with this feature is search performance. Indeed, it is possible that We would like to hear your feedback on using this prototype, and we would also like your input on the following questions to help us to decideing on a go-no-go decision for a generally available status of that feature in the future:
How to run the prototype?You need to start from a fresh new database (remove the previously used data.ms) and use the following Docker image:
How to use it?You can use the feature this way or look at the original PR for more info. Send some documents to Meilisearchcat movies.json | xh 'localhost:7700/indexes/movies/documents' 'content-type:application/json' Define the attributes you want to filter onecho '{ "filterableAttributes": ["genres"] }' | xh PATCH 'localhost:7700/indexes/movies/settings' Use
|
Beta Was this translation helpful? Give feedback.
-
Hi, The implementation of CONTAINS and STARTS WITH operators is perfect but we have another question. Index :
When we make this research with filters about experiences, we have a weird comportement. What is the research correct filter to use in this case ? |
Beta Was this translation helpful? Give feedback.
-
Hi, We have a category field that has flexible and hierarcial structure. If we want to list a parent category's items, we think that CONTAINS keyword would help us. We suppose that every item will have a field like category tree for example: categoryTree: "-> Main Root Category -> Parent1 Category -> Parent2 Category -> ... -> ParentN Category -> Sub Category". If we want to list Parent2 category's items, we will do this by filtering "categoryTree CONTAINS '-> Parent2 Category ->'" command. Do you have any suggestions for solving this requirement without CONTAINS keyword? Kindly regards, |
Beta Was this translation helpful? Give feedback.
-
Hi, we are also hoping for a progress update as we have need of the "starts with" filter. We have a CMS and have found Meilisearch to be amazing, the part that we've had to build a workaround for is being able to restrict search to a particular folder and subfolders. We allow users to embed their own search field on their pages and choose a base folder, so for the following data for instance, we'd like to be able to say "url starts with /parent-folder/"
Thanks for all your hard work, Meilisearch really has been a godsend, and because performance is so great we've been able to workaround this issue by simply searching everything and filtering out unwanted results in our own code, but would be ideal to have a single search request |
Beta Was this translation helpful? Give feedback.
-
We are considering moving away from meilisearch because we need to "contain string operator" on the filter. Our data includes a parameter called crashCase = Some user entered string We cannot use the query because crashCase is not searchable. (Its too long) Is there a workaround for this? |
Beta Was this translation helpful? Give feedback.
-
Hi, since there is already a prototype version for experience, I would like to know when this feature can be added to |
Beta Was this translation helpful? Give feedback.
-
Hello everyone 👋 We have just released the first RC (release candidate) of Meilisearch containing an experimental
You are welcome to leave your feedback or report bugs in this discussion. Thanks in advance for your help and your involvement in Meilisearch ❤️ 🎉 Official and stable release containing this change will be available on |
Beta Was this translation helpful? Give feedback.
-
Starting a fresh discussion for a
CONTAINS
operator.Initially expressed by
#539 (comment)
#407 (comment)
Comment made by @eelco-weblog.
For example, an e-commerce site wants to display
Apple Airpods
, but notApple Airpods Max
. Now, we can create an array of all the words in the title, save it as another property such as title_words and filter something like this:(title_words = airpod and title_words != max)
When we can use
CONTAINS
/NOT CONTAINS
, we do not have to create another property and filter directly on the title:(title CONTAINS airpod and title NOT CONTAINS max)
Beta Was this translation helpful? Give feedback.
All reactions