if (keyword) {
setLoading(true);
databases
.listDocuments(
import.meta.env.VITE_PUBLIC_DATABASE_ID,
import.meta.env.VITE_PUBLIC_COLLECTION_ID,
[
Query.search("title", keyword),
Query.orderDesc("$createdAt"),
]
)
.then((response) => {
setCrafts(response.documents);
console.log(response.documents);
})
.catch((error) => {
console.error("Failed to fetch user crafts:", error);
});
setLoading(false);
}
}, [keyword]);```
I have 2 different attributes title, description
so how i can query both at the same time
It sounds like you want to have a logical OR which isn't supported at the moment. Make sure to 👍 this issue: https://github.com/appwrite/appwrite/issues/2740
I would recommend creating an attribute containing all the text you want to search across and then use that in your query
Recommended threads
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...
- How to bypass the rate limit on the back...
Once a month my app has a ton of usage and I always run into the Too many requests 429 error. I am trying to optimize the queues and jobs to manage that, but a...
- 401 - Project not accessible in this reg...
Hi Appwrite team, I’m experiencing a Cloud Console issue with my NYC region project. Problem: - Some Console pages return: “401 - Project is not accessible ...