-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
More permissive search (substring, typo) #504
Comments
I agree it will be great to support approximate string matching. Under the hood, we use Lunr.js, which implements The Porter Stemming Algorithm. The word Lunr.js also supports wildcard matching, but we have enabled trailing wildcard only right now. While it seems we can apply the approximate string matching by constructing wildcard patterns, it needs some effort. |
Introduced While this will not resolve the stemming issue (E.g., can't match |
Thanks for the update, I've tested it and I observed some weird behavior using a fuzzy of If I type
I'm curious because Printing, writing, etc... Should not be detected based on lunr documentation. I think it may be due to the But the main problem IMO is the ordering, write should be ranked higher than printing (even if they both match for whatever reason). Again, I believe it's due to the Furthermore, with highlighting, it select what the user type and not the "fuzzy" word. In this example if I click on "write", it will try to highlight "wriet". Also, I feel like there is a weird interaction between The Porter Stemming Algorithm and the fuzzy finding, I don't know which one has priority over the other. It does not really matter and is only visible with weird query, but for the backlog, I put it here. |
Lunr.js will give the same score for different edit distances. See olivernn/lunr.js#383 We need to add |
We're using a different approach (constructing multiple queries in order), try v0.49.1 |
Thanks for the fix! I've just retried, and in my opinion, it's much better: the ranking feels more natural. However, there are still some issues:
With
So, I feel like the stemming is not well integrated with fuzzy searching. On its own (and on other example), it works well, but when combined with the fuzzy option, the results feel inconsistent. |
It would be nice to have an option that offers a more permissive search. For example, with the word
specialize
.What works in the search:
What doesn't work:
I think substrings should be easy to implement, but I'm not familiar enough with the code to do it. Any guidance?
The text was updated successfully, but these errors were encountered: