development-programming-algorithm-fuzzy-search.html
* created: 2025-05-26T16:27
* modified: 2025-10-03T16:42
title
Fuzzy Search
description
You can use a fuzzy search algorithm for approximate string matching which is useful when you have to relay on inherently unreliable users.
related notes
Approximate matching on strings
These are used if dealing with imprecise user inputs. The goal is to find entries that are approximately similar but not exactly the same.
Personal use case
I want to implement a search algorithm that helps users navigate my post note application quicker. I already distinguish between some important information like title, description, and tags from each individual note and can easily put them into a map.json which ought to be used as a mini database.
Implementing a fuzzy search algorithm
Now we can take a look at how we would implement such an algorithm, but we first need to decide which one we want to implement. There are a couple of decent options, each with their respect up- and downsides, I will take a look at two of them:
-
Levenshtein Distance