Add in default BM25 search params
https://lucaong.github.io/minisearch/types/MiniSearch.BM25Params.html
This commit is contained in:
@@ -166,6 +166,7 @@ export class SearchEngine {
|
|||||||
logVerbose(JSON.stringify(searchTokens, null, 1))
|
logVerbose(JSON.stringify(searchTokens, null, 1))
|
||||||
let results = this.minisearch.search(searchTokens, {
|
let results = this.minisearch.search(searchTokens, {
|
||||||
prefix: term => term.length >= options.prefixLength,
|
prefix: term => term.length >= options.prefixLength,
|
||||||
|
bm25: {b: 0.7, d: 0.5, k: 1.2},
|
||||||
// length <= 3: no fuzziness
|
// length <= 3: no fuzziness
|
||||||
// length <= 5: fuzziness of 10%
|
// length <= 5: fuzziness of 10%
|
||||||
// length > 5: fuzziness of 20%
|
// length > 5: fuzziness of 20%
|
||||||
|
|||||||
Reference in New Issue
Block a user