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
- Download appwrite Docs
Is there is a way to download appwrite Docs ? Because appwrite skill isn't enough to give the agent full understanding about how appwrite works (I noticed this ...
- Appwrite Cloud Project shutdown due to i...
My appwrite projects gets shut down saying due to inactivity, but our platform gets users everyday with many requests to database and storage. so why all of a s...
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...