Closed dhyeythumar closed 4 months ago
Also, one point I want to highlight. If I reduce the threshold to 0.4, then it will return "green" for "grean" query.
But now the issue with this threshold is it will return unrelated matches as well, for example, for "pen" we get "pink" which is completely unrelated.
if you have an array of strings as your haystack and want simple typo tolerance, you can try uFuzzy (with intraMode: 1
)
@leeoniya thanks for the suggestion will check this out.
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
Is there an existing issue for this?
Description of the bug
My use case is to extract color names from a given string. And I have provided the list of color names as my collection. But when I try to get the closest match for a color name with a typo, the fuse does not match with any of them, even when it's a single-character typo.
For example: Collection = ["Red", "Green", "Black"] Search word = "grean" Result from fuse = []
I wanted to know why this is not working. And did anyone face this kind of issue earlier?
The Fuse.js version where this bug is happening.
6.6.2
Is this a regression?
Which version did this behavior use to work in?
Steps To Reproduce
Here is the fiddle link to check: https://jsfiddle.net/ykecbuaz/12/ Open the fiddle console and try "grean" in the search bar.
Fuse options I used:
Expected behavior
Typo words should match the nearest similar word. For example: "grean" should match "green".
Screenshots
No response
Additional context
No response