Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

setIndexConfiguration

deprecated

Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.

The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.

Indexes are only supported with IndexedDb persistence. If IndexedDb is not enabled, any index configuration is ignored.

@deprecated

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

function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
§
setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>
[src]

Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.

The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.

Indexes are only supported with IndexedDb persistence. If IndexedDb is not enabled, any index configuration is ignored.

§Parameters

§
firestore: Firestore
[src]
  • The Firestore instance to configure indexes for.
§

-The index definition.

§Return Type

§
Promise<void>
[src]

A Promise that resolves once all indices are successfully configured.

§
setIndexConfiguration(firestore: Firestore, json: string): Promise<void>
[src]

Configures indexing for local query execution. Any previous index configuration is overridden. The Promise resolves once the index configuration has been persisted.

The index entries themselves are created asynchronously. You can continue to use queries that require indexing even if the indices are not yet available. Query execution will automatically start using the index once the index entries have been written.

Indexes are only supported with IndexedDb persistence. Invoke either enableIndexedDbPersistence() or enableMultiTabIndexedDbPersistence() before setting an index configuration. If IndexedDb is not enabled, any index configuration is ignored.

The method accepts the JSON format exported by the Firebase CLI (firebase firestore:indexes). If the JSON format is invalid, this method throws an error.

§Parameters

§
firestore: Firestore
[src]
  • The Firestore instance to configure indexes for.
§
json: string
[src]

-The JSON format exported by the Firebase CLI.

§Return Type

§
Promise<void>
[src]

A Promise that resolves once all indices are successfully configured.