Rank 3: Container
The separator can be anything but I think a space would work best. Also, you should probably look into using a function to populate the composite attribute field of all existing data and even going forward.
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
The separator can be anything but I think a space would work best. Also, you should probably look into using a function to populate the composite attribute field of all existing data and even going forward.
Rank 3: Container
yes i can confirm that as well i just now tryed in GraphQl the same with query.select it works.
Rank 3: Container
this sounds to me alot work and complex somehow
Rank 3: Container
i think this is maybe related to my issue https://github.com/appwrite/sdk-for-flutter/issues/173
Moderator
What’s your code?
Rank 3: Container
listDocuments(
databaseId: Env.databaseId,
collectionId: Env.locationsTableId,
queries: [
Query.search('Name', query),
Query.search('Addresse', query),
Query.select(["Name", "Addresse"]),
]);
Rank 3: Container
my code
Rank 3: Container
Yes, that's the same bug
Rank 3: Container
ok then for now i cant do anything then just wait for the bug to be fixed and wait for the implementation of the OR condition
Moderator
So
Moderator
OR works in certain conditions like
Moderator
Query.equal(‘attribute”, [string1, string2, etc])
Moderator
But if you just want to search for one thing
Moderator
You can use the same trick I use
Moderator
I have an Appwrite function that automatically finds any collection with a ‘search’ attribute and, when updated or created, JSON stringifies the object (minus the search field and any I don’t want searchable) into the search column which is then full text indexed
Moderator
so when I search it’s one search value and I’m searching the whole thing
Moderator
Do you think that would work here
Rank 3: Container
no its not the solution for me but dont have any choice in my point of view.
Rank 3: Container
yes i also want to search the whole collection if its possible but i thaught the way to do so would be like with Query.search operation and the same for all the fields
Moderator
The whole collection yeah that’s how I did it
Moderator
it’s not a complete solution, but also it actually is pretty nice IMO, it lets me be more selective about what I keep or don’t keep
Rank 3: Container
yes this seams to be good solution but i didnt get it completely what to do. Maybe if you give me some more informations. <i would be very happy
Moderator
Basically because you can only full text one attribute to search at a time, if you want to OR search something, make another attribute and whenever you update or create the other attributes, make that attribute just a JSON version of the attributes you want to search, then search that column
Rank 3: Container
would it then work if i have json string in a column and search.
Rank 3: Container
but i have also an idea. What if i search just one column at a time if i get empty list i search then the other colun automatically so it will be two searches.