CreateIndexedBoxFromConfig<K, T> extension

Extension on BoxConfig to easily create an IndexedBox with full-text search capabilities.

This extension provides a convenient method to instantiate an IndexedBox using the configuration stored in a BoxConfig object. It allows you to specify how to extract searchable text from your values, as well as fine-tune the indexing and search behavior.

Example:

final config = BoxConfig('articles', type: BoxType.regular);
final box = config.indexedBox<int, Article>(
  searchableText: (article) => article.title,
);

See also:

on

Methods

indexedBox({required String searchableText(T), Analyzer analyzer = Analyzer.prefix, TextAnalyzer<T>? overrideAnalyzer, bool matchAllTokens = true, int tokenCacheCapacity = 512, bool verifyMatches = false, int keyComparator(K a, K b)?}) IndexedBox<K, T>

Available on BoxConfig, provided by the CreateIndexedBoxFromConfig extension

Creates an IndexedBox using this BoxConfig.