0 votes
in Google Cloud by
How does Firestore handle indexing and what options do you have for customizing this?

1 Answer

0 votes
by

Firestore automatically indexes all fields in a document, enabling quick querying. However, this can be customized by creating composite indexes for complex queries or disabling automatic indexing on specific fields to save storage space and read/write costs. Composite indexes are created manually via the Firebase console or Google Cloud Platform (GCP) console, requiring specification of collection ID, fields to index, and their sort order. Disabling auto-indexing is done within Firestore security rules using “noindex” directive.

...