Score is not working correctly
See original GitHub issueHi,
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:
shouldSort: true,
includeScore: true,
threshold: 0,
location: 0,
distance: 0,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"title",
"author.firstName"
]
};
var fuse = new Fuse(list, options); // "list" is the item array
var result = fuse.search("Old Man's War");
the output:
[
{
"item": {
"title": "Old Man's War",
"author": {
"firstName": "John",
"lastName": "Scalzi"
}
},
"score": 2.220446049250313e-16
}
]
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
is Score not working / having issues for you? - mwallpapers
Score app Notifications are not working properly. Go to your Apps->Score->Notifications and check whether notifications enabled or not. If it is not enabled, ......
Read more >is Score not working / having issues for you? - 99images
Try Hard reboot in your Android mobile. Press and hold down the "Home" and "Power" buttons at the same time for upto 10...
Read more >General Troubleshooting - forScore | Support
Open the tools menu and choose Backup. Create a new backup file by tapping the + button in the upper right corner (if...
Read more >assembly 8086 - score isn't working properly
Are you sure that you're saving the scores correctly? Have you run the code in the debugger to see what's in [Score1] and...
Read more >Troubleshooting - PlayScore 2
In case of scanning problems the Status (tap the cogwheel) will show more information. If the problem is in a photographed score, the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
0
.@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:
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
v5.2.2-alpha.0
.However, I’m undecided about this. I’ve started a discussion in #397.
[Will close this and use the above issue instead]