user_id = data["user_id"]
followed_id = data["followed_id"]
result=None
query=[Query.equal("follower",user_id),Query.equal("following",followed_id)]
try:
result=databases.list_documents(databaseID,followCollectionID,queries=query)
print(result)
except Exception as e:
print(e)
result=None```
when i search one by one query it comes but i actually want to search if the collection has a document which satisfies both the queries how can i do that ?
if i use this syntax i get an index error
What do you mean? You want this?
follower == user id AND following == followed id
Yess i want to see if that exists in the same document
I got a workaround using 2 requests and checking if id matches
It should work...whats the result of the API call?
An error index does not exist
But when called individually it comes
So...did you create 1 index with both the attributes?
No 2 π€ we had to create one idex with both?
In it
Yep!
Let me try that asal
Asap *
Recommended threads
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...
- [SOLVED] CreateRow is doing ListRows on ...
### setup ``` appwrite 1.9.5 self-hosted bun 1.3 node-appwrite 27.1.0 ``` ### issue Im running a function on a self hosted 1.9.5 with "node-appwrite": "^27.1.0...
- Local function execution results in HTTP...
Hi all, I'm trying to develop a new function on my Ubuntu 24.04 machine running the latest version of docker. I've read through the documentation to install and...