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
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...