Gaurav Chadha
Gaurav Chadha3w ago

Database Query

I have tried to perform Buidlship Database Query with 3 AND contition values. and I got an error: FAILED_PRECONDITION: The query requires an index. You can create it here: https://console.firebase.google.com/v1/r/project/buildship-xxxx/firestore/indexes?create_composite=xxxxxxxxxxx It seems that max 2 conditions are allowed. Is that correct?
4 Replies
BuildShip AI Support
The error you're encountering indicates that your Firestore query requires an index to handle multiple conditions. Firestore does support queries with more than two conditions, but in such cases, you may need to create a composite index to support the query. For more details, you can refer to the BuildShip documentation on how to work with databases, including querying collections: BuildShip Tables
BuildShip Tables – BuildShip
A unified resource to start building your backend with low-code. Dive into triggers, nodes, and step-by-step guidance to jumpstart your workflow creation.
BuildShip AI Support
This solution is marked as answered and stored ✅
oneway6026
oneway60263w ago
I can't find anything explaining how to create composite index on this link. I think we don't even have an access to firestore from buildship. Am I wrong? Maybe solution is to use a proper database solution
BuildShip AI Support
You are correct that BuildShip provides a variety of database solutions, including Firestore. If you are looking for a more comprehensive database solution with advanced features like composite indexing, you might want to consider using Supabase. Supabase is a powerful, open-source database solution that integrates seamlessly with BuildShip. You can easily connect your Supabase project to BuildShip and perform operations like creating composite indexes. For more information on connecting Supabase with BuildShip and performing operations, you can refer to the Supabase documentation.