Back

Full search text

  • 0
  • Web
jerrie.bonk
29 Nov, 2023, 20:58

Hello all, i am trying to do this request Query.search('text', params.search) given the index i posted although i get error that attribute does not exist

Any idea?

TL;DR
Summary: The user is trying to perform a full text search using multiple attributes but is encountering an error. They are also wondering how to perform an OR search instead of an AND search. Solution: To perform a full text search on multiple attributes, the user can create a new attribute that contains all the data they want to search against and create a full text index on that attribute. To perform an OR search, the user needs to provide the ATTRIBUTE KEY they want to search on as the first parameter in the search query. The index key is only a name for the index and does not affect the search. If the user is receiving an error
Drake
30 Nov, 2023, 00:50

the first parameter to the search query is the ATTRIBUTE KEY you want to search on. The index key is only a name for the index so you can differentiate multiple indexes more easily

jerrie.bonk
30 Nov, 2023, 07:40

So in that case i have to do Query.search('text', params.search), Query.search('description', params.search) ? I want search to be performed as OR not AND

jerrie.bonk
30 Nov, 2023, 07:40

what if i have multiple attributes in an full text key? how to grab this?

Drake
30 Nov, 2023, 13:52

Since OR operations aren't supported yet, I suggest creating a new attribute that has all the data you want to search against. Then, create a full text index on that attribute

jerrie.bonk
1 Dec, 2023, 18:12

Thanks a lot

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more