setIndexConfiguration method

  1. @experimental
Future<void> setIndexConfiguration(
  1. {required List<Index> indexes,
  2. 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 in preview mode and is subject to change.


Future<void> setIndexConfiguration({
  required List<Index> indexes,
  List<FieldOverrides>? fieldOverrides,
}) async {
  String json = jsonEncode(
      'indexes': => index.toMap()).toList(),
          fieldOverrides?.map((index) => index.toMap()).toList() ?? [],

  return _delegate.setIndexConfiguration(json);