Optionalbm25BM25+ algorithm parameters. Customizing these is almost never necessary.
OptionalboostKey-value object of field names to boosting values. By default, fields are assigned a boosting factor of 1. If one assigns to a field a boosting value of 2, a result that matches the query in that field is assigned a score twice as high as a result matching the query in another field, all else being equal.
OptionalboostFunction to calculate a boost factor for documents. It takes as arguments the document ID, and a term that matches the search in that document, and the value of the stored fields for the document (if any). A falsy value skips the search result completely.
OptionalboostFunction to calculate a boost factor for each query term. Returning a factor lower than 1 reduces the importance of the term, greater than 1 increases it, and exactly 1 is neutral.
OptionalcombineThe operand to combine partial results for each term. Defaults to "OR".
OptionalfieldsNames of the fields to search in. If omitted, all fields are searched.
OptionalfilterFunction used to filter search results, for example on the basis of stored fields. It takes as argument each search result and should return a boolean to indicate if the result should be kept or not.
OptionalfuzzyControls whether to perform fuzzy search. Either a boolean (default fuzziness), a number (explicit edit distance ≥ 1, or fractional 0–1 of the term length), or a function returning either.
OptionallimitFrozenMiniSearch extension (not in MiniSearch): return at most limit results.
For finite scores and a deterministic filter that does not change scores, the
result equals an unbounded search followed by .slice(0, limit). Zero returns
an empty array without executing the query or its callbacks. Invalid limits
throw before query execution. Must be a non-negative integer or Infinity;
ignored by autoSuggest. Infinity or an explicit undefined removes an
index-level default limit.
When the limit is smaller than the raw candidate count, only retained results are materialized without a filter. With a filter, candidates are materialized in descending score order (insertion order for an unboosted wildcard) until enough are accepted. Filters should not depend on invocation order or count: an unbounded search filters before sorting. An unboosted wildcard stops scanning documents once enough are accepted; other queries still compute all candidate scores before selection.
OptionalmaxMaximum fuzziness when using a fractional fuzzy value. Defaults to 6.
OptionalprefixControls whether to perform prefix search. Either a boolean, or a function called per query term that returns a boolean.
OptionalprocessFunction to process or normalize terms in the search query. By default, the same term processor used for indexing is used also for search.
OptionaltokenizeFunction to tokenize the search query. By default, the same tokenizer used for indexing is used also for search.
OptionalweightsRelative weights to assign to prefix search results and fuzzy search results. Exact matches are assigned a weight of 1.
Search options to customize the search behavior.