Since string is deprecated I used varchar, and now I cant use Query.contains , so I setup fulltext index and started using Query.search
the issue is Query.search is very bad at searching, if I have string abc-123 then I have to write abc to get the row, otherwise no other way will match such as bc or 123
I guess it have an issue with special characters or numbers. or it's just bad at doing search.
?
ummm i think varchar should work with contains, let me check
Hey, can you share the issue you get when trying to use contains on a varchar?
For the search issue, there is a 3 char min for matches; bc can never match. 123 should though. Are you sending it as a string? Query.search('', '123')?
this is from console
Thanks, checking on this
yes its string but the other issue with special characters
say the string SWT-2621-44 when searching the same text it will return all ones that match the SWT not caring if match the reset of the text after the - character
This one I think is a quirk of the DB, because - is considered a stop character. Can you try with it in quotes? Like Query.search(attribute, '"SWT-2621-44"')
cool, that works, will update my code to prefix search string with
that still has the weird issue such anything after - must be full to match so SWT-262 wont match SWT-2621
Hmm not sure about this one, will check it out
A fix for the original query issue using varchar with contains is live now, let me know if you still have issues with it
Recommended threads
- Websites hosted on my appwrite sites hav...
Hello, all my websites hosted on appwrite sites are not running I am getting this message "This site can’t be reached drivehub.appwrite.network took too long t...
- Database Write Limits hit
Hello Appwrite Admins, I'm a GitHub Education user, and about a week ago, my database was really badly optimized, resulting in about 600k writes in a single day...
- How i can call increment with operators ...