Show HN: Front End Fuzzy and Substring and Prefix Search
50 points
2 days ago
| 2 comments
| github.com
| HN
Hey everyone, I have updated my fuzzy search library for the frontend. It now supports substring and prefix search, on top of fuzzy matching. It's fast, accurate, multilingual and has zero dependencies.

GitHub: https://github.com/m31coding/fuzzy-search Live demo: https://www.m31coding.com/fuzzy-search-demo.html

I would love to hear your feedback and any suggestions you may have for improving the library.

Happy coding!

brimtown
18 hours ago
[-]
I have a soft spot for these JS fuzzy matchers, but there are so many that it’s worth talking about about the specific tradeoffs you chose / ideally offering an interactive comparison like μFuzzy does:

https://github.com/leeoniya/uFuzzy

reply
kmschaal
11 hours ago
[-]
μFuzzy has a great comparison project that could serve as a reference for all fuzzy search implementations. My fuzzy searcher (v1) is already included and will soon be updated to v2 (PR is open).
reply
leeoniya
6 hours ago
[-]
i will caveat that the demo really only tests a specific set of options for each lib that try to closely match what uFuzzy does; and you can only adjust uFuzzy options in the ui. so do your own testing :)
reply
kmschaal
9 hours ago
[-]
OP here, I wanted to add one technical note I forgot to mention in the post.

The prefix search uses the same suffix array as the substring search. This approach might also be useful for other search libraries that rely on suffix arrays. It can improve the search experience with minimal additional effort.

Happy to discuss the implementation details if anyone’s curious!

reply