Hello, I am trying to create a query mixing search, greaterThanEqual and lessThanEqual.
...
queries: [
Query.greaterThanEqual("date", startDate),
Query.lessThanEqual("date", endDate),
Query.search('name', query),
],
...
I have already tried creating an index for this, but it is failing. Can I get an explanation why?, or advice on a workaround please.
You cannot include non-text attributes in a full text index.
In 1.3, we removed the requirement to have an index over all attributes so this wouldn't be a problem anymore
question though...what do you plan on passing for query and what documents are you expecting to find?
query would be part of the name of a client, and I woul expect to retrieve all documents matching that name, emitted within the date range
So you're trying to do an exact match? A concrete example would be helpful
query="mar"
Pool of all names: marcelo, maria, juan, mateo, mimar, zamarcia, esteban, lucas, arturo, mimace
Expected results marcelo, maria, mimar, zamarcia
Something like:
... WHERE NAME LIKE '%mar%' ...
In SQL
I see. The search query uses mariadb's full text search which does not behave like LIKE '%mar%'. For more info on how it works, see https://github.com/appwrite/appwrite/discussions/5005#discussioncomment-4681079
Appwrite 1.3 introduced 2 new queries: ends with and starts with. Those can be used like what you're trying to do...but we don't support OR logic yet
Thank you for answering me
Recommended threads
- Deleted my account, trying to signup aga...
https://cloud.appwrite.io/console/login?error=%7B%22message%22%3A%22This+email+address+must+already+be+in+its+canonical+form.+Please+remove+aliases%2C+tags%2C+o...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...