Add in default BM25 search params

https://lucaong.github.io/minisearch/types/MiniSearch.BM25Params.html
This commit is contained in:
2026-02-13 12:04:52 -07:00
parent 0c5b956e53
commit 7a1414d397
+1
View File
@@ -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%