Introduction
Firestore stores data in documents and collections. To find data quickly, Firestore uses queries. Some queries need indexes to work fast and correctly.
When you want to find documents with specific field values in a collection.
When you need to sort query results by one or more fields.
When you want to filter documents using multiple conditions on different fields.
When you want to paginate query results for a better user experience.
When Firestore tells you an index is missing for your query.