1
0 Comments

Fuzzy search

It took me over a week to implement the fuzzy search feature. Popularized by Sublime Text, fuzzy search is becoming a must-have feature for our daily work as developers. Personally, I can't stand using any text editor software or browsing app without it!

Two critical aspects are scoring and performance. The algorithm must be fast enough to appear quickly on the screen, preferably in the blink of an eye. And the most relevant results must stay at the top, of course!

While implementation in C or Swift or Go can easily be fast, implementation in JavaScript is a challenge. Especially for large repositories like Linux. I ended up using a hybrid approach of 2 different algorithms: indexing and fuzzy matching. The indexed table can return the result list really fast, typically in sub-millisecond! But it only works for start-of-word matches. While fuzzy matching can return a wide range of results in a few hundred milliseconds. The extension smartly decides when to use which algorithm.

The version with fuzzy search is published on Firefox and Chrome store today. Come and give it a try. I hope you enjoy it!

Trending on Indie Hackers
I bootstrapped my SaaS to $15,000 MRR over 3 years AMA! 52 comments What are the fuel materials that motivate you to build projects? 11 comments I'll review your SaaS onboarding for Free! 10 comments I made a notion doc, curated list of tools to get you started as a maker/creator, It's Free. 8 comments Be faster or be better - what way to grow? 2 comments How to develop products quickly with a small team? Server-side rendering is back! 2 comments