krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
18.14k stars 767 forks source link

Matching threshold scoring to two decimal places? #685

Closed ShetlandJ closed 1 year ago

ShetlandJ commented 2 years ago

I have a list of ingredients and I am searching it for "unsalted butter". From that fuse search, I get these results:

image

I would like to narrow my results down to just Butter and Peanut Butter, but If set the threshold to 0.70, it still includes those extra 0.7xxxx results. Is it possible to cut those out?

Options:

const fuseOptions = {
    includeScore: true,
    threshold: 0.71,
    distance: 10,
    keys: ["name"],
};
github-actions[bot] commented 1 year ago

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days