So currently I have been trying to get list of documents where I am trying to find a string out of array of strings (attribute in collection). Query.equal("ids", myString) did not work so I tried Query.search("ids", myString) after making a fulltext index but realised search does not work with underscore in the ids. Not sure what to do here ;-;
btw Query.search() works fine if there is no underscore or other special characters
but the way i have made IDs in collection are with underscore (kinda regretting it now)
i changed the IDs.. works now and i dont think it will be possible any other way since its just how fulltext indexes work in maria db 🤔
but yea relationship queries will be a game changer here
I typically put the parent id in the child document. Then I can filter for children with parent id = XYZ.
I used that approach in this app: https://levelup.gitconnected.com/building-a-location-based-app-with-appwrite-48a2e2b6d4c2
i see 👍 btw can i expect relationship queries in appwrite 1.4?
another question (offtopic) do i need to purify string before passing it in Query.search? can there be sql injections if i dont?
Not yet
No need to worry about SQL injection
Gotcha!
Recommended threads
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this
- AppwriteException: Invalid query: Query ...
```js console.log(typeof interaction.user.id) console.log(interaction.user.id) const user_check = await TablesDB.listRows({ databaseId: "db", ...