Back to Firebase Js Sdk

Index interface

docs-devsite/firestore_.index.md

12.12.11.8 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

Index interface

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.

Warning: This API is now obsolete.

Instead of creating cache indexes manually, consider using enablePersistentCacheIndexAutoCreation() to let the SDK decide whether to create cache indexes for queries running locally.

The SDK definition of a Firestore index.

<b>Signature:</b>

typescript
export declare interface Index 

Properties

PropertyTypeDescription
collectionGroupstring<b><i>(Public Preview)</i></b> The ID of the collection to index.
fieldsIndexField<!-- -->[]<b><i>(Public Preview)</i></b> A list of fields to index.

Index.collectionGroup

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.

The ID of the collection to index.

<b>Signature:</b>

typescript
readonly collectionGroup: string;

Index.fields

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.

A list of fields to index.

<b>Signature:</b>

typescript
readonly fields?: IndexField[];