how fuzzy search works

How Fuzzy search works?

Rate this article

Share this article
Share on facebook
Share on twitter
Share on linkedin
Share on email

Fuzzy search finds similar words and is very useful in terms of handling spelling errors made while searching on a website.

How fuzzy search works?

Fuzzy search works by using mathematical formulae that calculate the distance (or similarity between ) two words. One such commonly used method is called the Levenshtein distance.

Mathematically, the formula is (which we will not discuss in this article)

Here we will use certain examples to illustrate this-

For example, when you do a search for fitbt in expertrec’s custom search, these are the results we get which show the fuzzy search at fuzzy search works

As you can see, the first result is fitbit. 

Now let’s calculate the levenshtein distance between the words w1=fitbt and w2=fitbit

Levenshtein distance =1

how fuzzy search works

Now to understand why fitness doesn’t come for the search query fitbt, let’s calculate the levenshtein distance between the words w1=fitbt and w2=fitness.

As you can see in the image below, levenshtein distance =4 how fuzzy search works

When the levenshtein distance is more, the words are more dissimilar and come lower in search results.

Create your own fuzzy search engine here.


Sign Up for ExpertRec



Leave a Reply

Avatar placeholder

Your email address will not be published.

You may also like
Hold on!
We’ve gathered our industry knowledge and are sharing hacks, tips to increase e-commerce revenue. Contains best tips for scaling up your ecommerce business.