How does search query work? #5005
-
👟 Reproduction stepsII'm designing a mobile app search filter and I have a fullindex on 2 attributes. The Query.search method works strangely. For example, if I have the string "1111,2222", method finds the record both if I pass the string "2222" or "1111". But if the string looks like this "1111,ww" and I type "ww" it no longer finds this record. It only finds if I type "1111". But this is not the only case where it works in unexpected ways. I was wondering if it might have something to do with caching some things by backend, because It works in a completely unpredictable way. 👍 Expected behaviorQuery.search method should always search in the whole string some substring, not from the beginning, 👎 Actual BehaviorIt works in a completely unpredictable way. It only works always fine if I have a string of digits separated by a separator 🎲 Appwrite versionVersion 1.0.x 💻 Operating systemLinux 🧱 Your EnvironmentI use appwrite as backend for Flutte mobile app. 👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Appwrite uses MariaDB's full-text search in boolean mode for the search query. When you make a query like: Query.search("yearTags", ["1111"])Appwrite sends a query to MariaDB like: MATCH(yearTags) AGAINST("'1111*'" IN BOOLEAN MODE)
Since we're using MariaDB's full-text search, there are a few other things to keep in mind.
I hope that gives you more insight into how the search works. |
Beta Was this translation helpful? Give feedback.



Appwrite uses MariaDB's full-text search in boolean mode for the search query. When you make a query like:
Appwrite sends a query to MariaDB like:
source code
Since we're using MariaDB's full-text search, there are a few other things to keep in mind.
I hope that giv…