-
Notifications
You must be signed in to change notification settings - Fork 103
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
Search does not find all matches #9
Comments
hi @jwillmer! Is is possible for you to set up a simple test page for me to see how you're using fuzzyset and how it's failing? That would make it a lot easier for me to understand if there's a bug and how to fix it. Thanks! |
What is the problem with my example? The files are not minified, the init for |
Okay, I see now. I was worried that there was lots of other code that would interfere with the bug-finding process, but it's not bad. I briefly looked into it, but I don't know why it's happening. It's only matching on gram size 3, returning one result, and not checking for gram size 2 because it found a result for 3. I probably won't get around to checking this for a long time, but you might try messing with the gram sizes in the mean time, @jwillmer. |
It could be that a fork of the project has fixed the bug without knowing that it is a bug: willlma@b6d9c59 |
The bug is in those lines:
That alone causes that only best scored items is returned. My proposition would be to add |
I'm also seeing this on the project example page. Go here: http://glench.github.io/fuzzyset.js/#example type in "Mas" or "Mass". Expected result: Massachusetts Given results: Interestingly, if you skip the first letter you get the correct result. |
Ok cool, does someone want to submit a pull request with the correct changes? |
Another problem in the example: "Northern Marianas Islands" is in the list, but when you search for "Islands Northern" you get no results. Not such a good fuzzy implementation if it doesn't tokenize. |
@Glench would you mind to fix this issue for us? Since you know the project best and the investigation has already been done 😉 |
why reinvent the wheel? use something that works now https://github.com/atom/fuzzaldrin |
working on it! It will probably be fixed today. |
@monolithpl I think the problem with that particular example is that you should set |
@ryanweal Testing this now, it seems like setting |
Ok, so I fixed the library to look a bit more like @WillMa's fork. Now by default results with a score >= .33 are shown and that score can be passed to the
In general, I would also recommend trying to set There's also now a rough debugging interface for fuzzyset.js that might help you understand what's going on a little better. I used it to try out @jwillmer's original example. |
Maybe I missunderstand the search but I think it does not work as it should. I use
fuzisearch.js
to compare urls with each other.If someone misstypes a url like:
he is redirected to an error page and I add all urls from my website:
to
fuzisearch.js
and as search result I only get one url back:Shouldn’t there be at least three urls that have some kind of match?
The text was updated successfully, but these errors were encountered: