loilo / Fuse

🔍 Fuzzy search for PHP, ported from Fuse.js
Apache License 2.0
321 stars 30 forks source link

Mixed scores for matching results. #26

Open ItsJoeTurner opened 4 years ago

ItsJoeTurner commented 4 years ago

I have matches that come through with a score of 2.2+ and then other concrete matches that show a score of 0.01 - I have some code that looks for anything over 2 and anything under 0.1, but are you aware of this?

loilo commented 4 years ago

Hey @ItsJoeTurner, thanks for reporting.

I'm not aware of those issues, but this is just a "dumb" port of Fuse.js, so I'm not familiar with the searching/scoring logic myself. If you could provide an example that produces these results, I could determine if this is an issue with Fuse.js itself or with my port.

lennart-hendriksma commented 3 years ago

If you round($result, 4) the result, you will get 0.0001

Original post: https://github.com/krisk/Fuse/issues/481#issuecomment-691711949

loilo commented 3 years ago

So this seems to be an issue with Fuse.js itself. Gonna mark this as upstream.