A Config is required to add/search in an Index
Create doc config
ref extracts the unique id of a document. It will be used to deduplicate
results
fields is a list of content extractors. They return the text to index.
normalize is called to simplify strings before being indexed, and on the
searched text.
A typical config is:
{ ref = .id
, fields = [ .name, .description ]
, normalize = Sring.toLower >> String.Normalize.removeDiacritics
}Set the maximum number of results to return on a search
The default value is 1000
This value is indicative only and result may be bigger
An Index holds data to quickly find doc document given doc substring of its indexed fields