What is the syntax for a wildcard level in Cloud Firestore when setting up indexing? I know there is one for security rules.
Thanks.
There are no wildcards in Firestore paths to documents. You have to identify collections and documents by their IDs. If you need to find some documents based on some property, you'll need to do a query using some field value as a filter. You might be confused by wildcards in Cloud Functions trigger paths.
From the CLI, edit your index configuration file, with default filename firestore. indexes. json , and deploy using the firebase deploy command.
Cloud Firestore uses two types of indexes: single-field and composite.
Cloud Firestore indexes are based on collection names, not full collection paths. So if you want to create indexes on users/{id}/messages
, the correct way to do this is to create an index on messages
.
All same-named collections, even if nested under documents, share the same indexes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With