Skip to content

Commit 1b6c95b

Browse files
committed
index_configuration.ts: mark manual index creation apis as "deprecated"
1 parent 3f3c3eb commit 1b6c95b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

packages/firestore/src/api/index_configuration.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export {
3636

3737
/**
3838
* A single field element in an index configuration.
39+
*
40+
* @deprecated Instead of creating cache indexes manually, consider using
41+
* `enablePersistentCacheIndexAutoCreation()` to let SDK decide whether to
42+
* create cache indexes for queries running locally.
43+
*
3944
* @beta
4045
*/
4146
export interface IndexField {
@@ -61,6 +66,11 @@ export interface IndexField {
6166

6267
/**
6368
* The SDK definition of a Firestore index.
69+
*
70+
* @deprecated Instead of creating cache indexes manually, consider using
71+
* `enablePersistentCacheIndexAutoCreation()` to let SDK decide whether to
72+
* create cache indexes for queries running locally.
73+
*
6474
* @beta
6575
*/
6676
export interface Index {
@@ -77,6 +87,11 @@ export interface Index {
7787
*
7888
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
7989
* for a description of the format of the index definition.
90+
*
91+
* @deprecated Instead of creating cache indexes manually, consider using
92+
* `enablePersistentCacheIndexAutoCreation()` to let SDK decide whether to
93+
* create cache indexes for queries running locally.
94+
*
8095
* @beta
8196
*/
8297
export interface IndexConfiguration {
@@ -104,6 +119,11 @@ export interface IndexConfiguration {
104119
* @throws FirestoreError if the JSON format is invalid.
105120
* @returns A `Promise` that resolves once all indices are successfully
106121
* configured.
122+
*
123+
* @deprecated Instead of creating cache indexes manually, consider using
124+
* `enablePersistentCacheIndexAutoCreation()` to let SDK decide whether to
125+
* create cache indexes for queries running locally.
126+
*
107127
* @beta
108128
*/
109129
export function setIndexConfiguration(
@@ -135,6 +155,11 @@ export function setIndexConfiguration(
135155
* @throws FirestoreError if the JSON format is invalid.
136156
* @returns A `Promise` that resolves once all indices are successfully
137157
* configured.
158+
*
159+
* @deprecated Instead of creating cache indexes manually, consider using
160+
* `enablePersistentCacheIndexAutoCreation()` to let SDK decide whether to
161+
* create cache indexes for queries running locally.
162+
*
138163
* @beta
139164
*/
140165
export function setIndexConfiguration(

0 commit comments

Comments
 (0)