Implementation of Levenshtein distance for mysql/fuzzy search?

In order to efficiently search using levenshtein distance, you need an efficient, specialised index, such as a bk-tree. Unfortunately, no database system I know of, including MySQL, implements bk-tree indexes. This is further complicated if you’re looking for full-text search, instead of just a single term per row. Off-hand, I can’t think of any way that you could do full-text indexing in a manner that allows for searching based on levenshtein distance.

Leave a Comment