Although this is rarely needed, and requires a good understanding of the Okapi BM25+ scoring model, some use cases (such as non-latin scripts with a very different structure) can benefit from it.
// BM25 params can be passed as part of searchOptions in the constructor
const ms = new MiniSearch({
fields: ['text'],
searchOptions: { bm25: { k: 1.0, b: 0.7, d: 0.5 } }
})
// Alternatively, they can be passed as options to individual searches
ms.search('something', { bm25: { k: 1.0, b: 0.7, d: 0.5 } })
Resolves: #163
Although this is rarely needed, and requires a good understanding of the Okapi BM25+ scoring model, some use cases (such as non-latin scripts with a very different structure) can benefit from it.