setIndexConfiguration
deprecatedConfigures 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.
Instead of creating cache indexes manually, consider using
enablePersistentCacheIndexAutoCreation()
to let the SDK decide whether to
create cache indexes for queries running locally.
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
-The index definition.
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.