krisk / Fuse

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

The score is always 1 when using extendedSearch and "include" match type #522

Closed baibonjwa closed 3 years ago

baibonjwa commented 3 years ago

Describe the bug

image

The score is always 1 and I cannot sort the results. Is this a bug or expected behavior?

Version

6.4.3

Minimal Reproduction

Demo: https://jsfiddle.net/baibonjwa/dcoL1nth/17/

skearney6 commented 3 years ago

Yes! This one was messing me up big time. I see that the scoring for this looks flipped in the code. I'm going to send a PR for that - hopefully it will be accepted quickly. 🤞