openIndex abstract method

Future<MimirIndex> openIndex(
  1. String name, {
  2. String? primaryKey,
  3. List<String>? searchableFields,
  4. List<String> filterableFields,
  5. List<String> sortableFields,
  6. List<String> rankingRules,
  7. List<String> stopWords,
  8. List<Synonyms> synonyms,
  9. bool typosEnabled,
  10. int minWordSizeForOneTypo,
  11. int minWordSizeForTwoTypos,
  12. List<String> disallowTyposOnWords,
  13. List<String> disallowTyposOnFields,
})

Eagerly opens an index with the supplied name and settings. If you know the primary key (or any of the other settings) in advance, it is recommended to use openIndex over getIndex. See also getIndex for restrictions on what name can be.

While getIndex opens indexes lazily (on the first method call), openIndex both opens and initializes an index before returning.

Implementation

Future<MimirIndex> openIndex(
  String name, {
  String? primaryKey,
  List<String>? searchableFields,
  List<String> filterableFields,
  List<String> sortableFields,
  List<String> rankingRules,
  List<String> stopWords,
  List<Synonyms> synonyms,
  bool typosEnabled,
  int minWordSizeForOneTypo,
  int minWordSizeForTwoTypos,
  List<String> disallowTyposOnWords,
  List<String> disallowTyposOnFields,
});