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.
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.