setIndexConfiguration method
- @Deprecated('setIndexConfiguration() has been deprecated. Please use `PersistentCacheIndexManager` instead.')
- required List<
Index> indexes, - List<
FieldOverrides> ? fieldOverrides,
Configures indexing for local query execution. Any previous index configuration is overridden.
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.
This API is now deprecated
Implementation
@Deprecated(
'setIndexConfiguration() has been deprecated. Please use `PersistentCacheIndexManager` instead.',
)
Future<void> setIndexConfiguration({
required List<Index> indexes,
List<FieldOverrides>? fieldOverrides,
}) async {
String json = jsonEncode(
{
'indexes': indexes.map((index) => index.toMap()).toList(),
'fieldOverrides':
fieldOverrides?.map((index) => index.toMap()).toList() ?? [],
},
);
return _delegate.setIndexConfiguration(json);
}