-
-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Score is not working correctly #354
Comments
Before last release this was |
@laurentiustroia, True that the previous release was an exact In the meantime, is the score not being zero breaking some logic for you? |
Me based on that score to know when is exact match, otherwise is good to update the docs to know exactly how i can see exact match vs a variation name, example, if search |
I ran in to this issue as well. As a quick workaround, I applied |
Yeah, this broke my logic and took me a while to debug. The docs should definitely be changed if an exact match is no longer strict equality @MadsMadsDk I'm not sure that is the best way to do it, as partial match scores can be as low as 0.001, which with your fix would be cast as "perfect" even though it's not quite. I've gone with this for the time being: const perfectMatch = result.score < 1E-10; But I think it would be very good to have a solution with a strong guarantee when a result is a perfect match. |
Addressed this in However, I'm undecided about this. I've started a discussion in #397. [Will close this and use the above issue instead] |
Hi,
in last version 3.6.1 the score is not between 0 and 1. This can be check on https://fusejs.io/ too.
Example request + config:
the output:
The text was updated successfully, but these errors were encountered: