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
- Repository directory size should be less...
Whenever I create a function i get the error above. Is there a way to get around this? How do I fix this?
- Cant get realtime working
Hey I nned some help with realtime a gain. I was using client.subscribe(...), and i found out that its depricated then i believe realtime.subscribe(...) is the ...
- Firebase app import
I'm **very** new to appwrite and I just set up appwrite with docker and I'm trying to import a Firebase app I have set up but it's erroring and I don't really k...