Back

search is not working while adding multiple attributes

  • 0
  • Web
Armstone
6 Mar, 2024, 08:26
TL;DR
Developers discussing adding multiple attributes for search, but encountering issues where it only supports AND operator. They mention a newer version (1.5x) might add support for OR operator. The problem arises when trying to search for a value in either attribute.
Armstone
6 Mar, 2024, 08:27
Armstone
6 Mar, 2024, 08:27

It works when i am searching with one attribute

Armstone
6 Mar, 2024, 09:09

search is not working while adding multiple attributes

Guille
6 Mar, 2024, 12:37

What does mean "Not working", do you get an error? you don't the expected results?

FYI currently queries only support AND operator, that means, you are looking for title=x AND category=x

Armstone
6 Mar, 2024, 12:39

it means query only support AND operator

Armstone
6 Mar, 2024, 12:42

how can i use two attribute

darShan
6 Mar, 2024, 12:42

your title and category search for the same query. is that intended?

Armstone
6 Mar, 2024, 12:42

yes

Armstone
6 Mar, 2024, 12:42

return the value whether it is in title or category attribute

darShan
6 Mar, 2024, 12:44

Ahh. You are trying to use an or logic.

darShan
6 Mar, 2024, 12:44

I think Query.or is added on 1.5x.

Armstone
6 Mar, 2024, 12:44

yes you are right

darShan
6 Mar, 2024, 12:45

using what you are doing, it will search for documents where the category AND title contain your query.

Armstone
6 Mar, 2024, 12:45

i want to check whether that value is in either both the attribute or not

darShan
6 Mar, 2024, 12:47

You'll have to do multiple calls for that atm. Once 1.5x is released, the or can be used.

Armstone
6 Mar, 2024, 12:47

I am very disappointed with appwrite version

darShan
6 Mar, 2024, 12:49

Just a few more weeks for the release πŸ™‚

Armstone
6 Mar, 2024, 12:55

sorry to say but who are you

darShan
6 Mar, 2024, 13:00

someone waiting for 1.5x release as well 😸

Faye
6 Mar, 2024, 13:00

i see double post #search is not working while adding multiple attributes but working with single attribute valuesearch

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