-
-
Notifications
You must be signed in to change notification settings - Fork 772
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
Not matching obvious matches? #750
Comments
I noticed the same when searching for names. "John Doe" matches "John Doe" But if the name is in reversed order: "Doe John" matches "Doe Smith" Which doesn't make too much sense. |
I ended up using "minisearch". It's possible I just didn't configure Fuse correctly though.
|
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Description of the bug
v7.0.0
Given a list of strings, I search for 2 words, fuse results scores where entries with those 2 words are not scored high
The Fuse.js version where this bug is happening.
Other: 7.0.0
Is this a regression?
no idea. this is the first time I've used fuse
Which version did this behavior use to work in?
no idea. this is the first time I've used fuse
Steps To Reproduce
Load a bunch of simple records in with name, id
Search for 2 words in name in some records
https://jsfiddle.net/greggman/3780hd6w/
Expected behavior
The entries with the 2 words have the highest score
For example if the entries were
And the search was
Then I'd expect entries 1 and 2 to be the highest scored as they contain both words vs 3 and 4 which contain only 1 word each and 5 which contains none of the words I searched for
But that's not what I see
Screenshots
Example output:
Here's are the 5 entries that have both "color" and "webgpu" in them
And here's the results from searching with their score. The 5 entries are marked with
=>
. I'd have expected them to be the top 5 results.Additional context
The linked jsfiddle does a simple filter for entries that have the words "color" and "webgpu" (case insensitive). It finds 5 entries. Those entries are no where near highest scores of the fuse results.
Maybe I'm using it wrong or maybe I don't understand what this library is supposed to do?
The text was updated successfully, but these errors were encountered: