Hello, Is substring look up possible for array of strings?
Query.contains('product_names', [chair]),
this only works if I have the exact item name. cha instead of chair does not work.
product_names is a an array: ['chair', 'door', 'table']
try .contains()
product_name.contains('chair')
I would cast your query results to a var with a type and then use your languages type functions to parse the list, not try to handle that with the Appwrite sdk
my issue is, product_name.contains('chair') works, but product_name.contains('cha') does not fetch the rows that have chair as one of the array elements.
it would also help to know what language you're using
this js. for web
Then I think we're confusing 2 things here, searching a list, and using the SDK to search for rows whose product contains characters. You might try Query.contains['product_name', searchTermVariable] and have that run onKeyUp https://appwrite.io/blog/post/introducing-new-database-operators but this will result in hecking calls to your DB
If that doesn't work it's possible AppWrite doesn't support partial searches / substring searches in the DB
but I'm not an expert I've been using appwrite for like a week
.contains() does substring look up but when it is just a string, and not an array. so you are not wrong thinking about .contains().
Recommended threads
- Session cookies stored on wrong (sub-)do...
Hi, I own a domain `example.com` which is registered with the Appwrite nameserver. My website runs on Sites, using `www.example.com` as domain, and my function...
- sh: vite: Permission denied
When installing the vue starter template as site and then adding DaisyUI, i get the error `sh: vite: Permission denied`. I also got this issue (with a fresh tem...
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.