Stay organized with collections
Save and categorize content based on your preferences.
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Instead of creating cache indexes manually, consider using enablePersistentCacheIndexAutoCreation() to let the SDK decide whether to create cache indexes for queries running locally.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-27 UTC."],[],[],null,["# Index interface\n\n\u003e This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.\n\u003e | **Warning:** This API is now obsolete.\n\u003e\n\u003e Instead of creating cache indexes manually, consider using `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to create cache indexes for queries running locally.\n\nThe SDK definition of a Firestore index.\n\n**Signature:** \n\n export declare interface Index \n\nProperties\n----------\n\n| Property | Type | Description |\n|---------------------------------------------------------------|-------------------------------------------------------------------|-----------------------------------------------------------|\n| [collectionGroup](./firestore_.index.md#indexcollectiongroup) | string | ***(Public Preview)*** The ID of the collection to index. |\n| [fields](./firestore_.index.md#indexfields) | [IndexField](./firestore_.indexfield.md#indexfield_interface)\\[\\] | ***(Public Preview)*** A list of fields to index. |\n\nIndex.collectionGroup\n---------------------\n\n\u003e This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.\n\nThe ID of the collection to index.\n\n**Signature:** \n\n readonly collectionGroup: string;\n\nIndex.fields\n------------\n\n\u003e This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.\n\nA list of fields to index.\n\n**Signature:** \n\n readonly fields?: IndexField[];"]]