{"id":1389,"date":"2018-10-09T00:44:26","date_gmt":"2018-10-09T07:44:26","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/"},"modified":"2018-10-09T00:44:26","modified_gmt":"2018-10-09T07:44:26","slug":"fuzzy-matching","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/fuzzy-matching\/","title":{"rendered":"What Is Fuzzy Matching and How to Use It Correctly"},"content":{"rendered":"\n<p>Have you sound yourself asking the question, \u201cWhat is fuzzy matching?\u201d Fuzzy matching allows you to identify non-exact matches of your target item. It is the foundation stone of many search engine frameworks and one of the main reasons why you can get relevant search results even if you have a typo in your query or a different verbal tense.<\/p>\n\n\n\n<p>As you might expect, there are many fuzzy searching algorithms that can be used for text, but virtually all search engine frameworks (including <a href=\"https:\/\/blevesearch.com\/\">bleve<\/a>) use primarily the Levenshtein Distance for fuzzy string matching:<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Levenshtein Distance<\/strong><\/h3>\n\n\n\n<p>Also known as <strong>Edit Distance<\/strong>, it is the number of transformations (deletions, insertions, or substitutions) required to transform a source string into the target one. For a fuzzy search example, if the target term is \u201cbook\u201d and the source is \u201cback\u201d, you will need to change the first \u201co\u201d to \u201ca\u201d and the second \u201co\u201d to \u201cc\u201d, which will give us a Levenshtein Distance of 2.Edit Distance is very easy to implement, and it is a popular challenge during code interviews (<a href=\"https:\/\/rosettacode.org\/wiki\/Levenshtein_distance\">You can find Levenshtein implementations in JavaScript, Kotlin, Java, and many others here<\/a>).<\/p>\n\n\n\n<p>Additionally, some frameworks also support the Damerau-Levenshtein distance:<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Damerau-Levenshtein distance<\/strong><\/h3>\n\n\n\n<p>It is an extension to Levenshtein Distance, allowing one extra operation: <strong><em>Transposition<\/em><\/strong>\u00a0of two adjacent characters:<\/p>\n\n\n\n<p><strong>Ex: <\/strong>TSAR to STAR<\/p>\n\n\n\n<p><strong>Damerau-Levenshtein distance = <\/strong>1\u00a0 (Switching S and T positions cost only one operation)<\/p>\n\n\n\n<p><strong>Levenshtein distance = 2\u00a0<\/strong> (Replace S by T and T by S)<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Fuzzy matching and relevance<\/strong><\/h2>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>Fuzzy matching has one big side effect; it messes up with relevance. Although Damerau-Levenshtein is a fuzzy matching algorithm that considers most of the common user\u2019s misspellings, it also can include a significant number of <strong>false positives<\/strong>, especially when we are using a language with an <a href=\"https:\/\/www.wolframalpha.com\/input\/?i=average+english+word+length\">average of just 5 letters per word<\/a>, such as English. That is why most of the search engine frameworks prefer to stick with Levenshtein distance. Let\u2019s see a real fuzzy matching example of it:<\/p>\n\n\n\n<p>First, we are going to use <a href=\"https:\/\/github.com\/deniswsrosa\/movies_dataset\">this movie catalog dataset<\/a>. I highly recommend it if you want to play with full-text search. Then, let\u2019s search for movies with \u201c<strong>book<\/strong>\u201d in the title. A simple code would look like the following:<\/p>\n\n\n<p>[crayon lang=&#8221;java&#8221; decode=&#8221;true&#8221;]String indexName = &#8220;movies_index&#8221;;<br \/>\nMatchQuery query = SearchQuery.match(&#8220;book&#8221;).field(&#8220;title&#8221;);<br \/>\nSearchQueryResult result = movieRepository.getCouchbaseOperations().getCouchbaseBucket().query(<br \/>\nnew SearchQuery(indexName, query).highlight().limit(6));<\/p>\n<p>printResults(movies);[\/crayon]<\/p>\n\n\n\n<p>The code above will bring the following results:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]1) The Book Thief<br \/>\n     score: 4.826942606027416<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; Thief]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>2) The Book of Eli<br \/>\n     score: 4.826942606027416<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Eli]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>3) The Book of Life<br \/>\n     score: 4.826942606027416<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Life]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) Black Book<br \/>\n     score: 4.826942606027416<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[Black &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>5) The Jungle Book<br \/>\n     score: 4.826942606027416<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>6) The Jungle Book 2<br \/>\n     score: 3.9411821308689627<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt; 2]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>By default, the results are case-insensitive, but you can easily change this behavior by creating new indexes with different analyzers.<\/p>\n\n\n\n<p>Now, let\u2019s add a fuzzy matching capability to our query by setting fuzziness as 1 (Levenshtein distance 1), which means that \u201c<strong>book<\/strong>\u201d and \u201c<strong>look<\/strong>\u201d will have the same relevance.<\/p>\n\n\n<p>[crayon lang=&#8221;java&#8221; decode=&#8221;true&#8221;]String indexName = &#8220;movies_index&#8221;;<br \/>\nMatchQuery query = SearchQuery.match(&#8220;book&#8221;).field(&#8220;title&#8221;).fuzziness(1);<br \/>\nSearchQueryResult result = movieRepository.getCouchbaseOperations().getCouchbaseBucket().query(<br \/>\nnew SearchQuery(indexName, query).highlight().limit(6));<\/p>\n<p>printResults(movies);[\/crayon]<\/p>\n\n\n\n<p>And here is the fuzzy search result:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]1) Hook<br \/>\n     score: 1.1012248063242538<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:hook<br \/>\n          fragment:[&lt;mark&gt;Hook&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>2) Here Comes the Boom<br \/>\n     score: 0.7786835148361213<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:boom<br \/>\n          fragment:[Here Comes the &lt;mark&gt;Boom&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>3) Look Who&#8217;s Talking Too<br \/>\n     score: 0.7047266634351538<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:look<br \/>\n          fragment:[&lt;mark&gt;Look&lt;\/mark&gt; Who&#8217;s Talking Too]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) Look Who&#8217;s Talking<br \/>\n     score: 0.7047266634351538<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:look<br \/>\n          fragment:[&lt;mark&gt;Look&lt;\/mark&gt; Who&#8217;s Talking]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>5) The Book Thief<br \/>\n     score: 0.5228811753737184<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; Thief]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>6) The Book of Eli<br \/>\n     score: 0.5228811753737184<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Eli]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>Now, the movie called \u201c<strong>Hook<\/strong>\u201d is the very first search result, which might not be exactly what the user is expecting in a search for \u201c<strong>Book<\/strong>\u201d.<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How to minimize false positives during fuzzy lookups<\/strong><\/h3>\n\n\n\n<p><strong>\u00a0<\/strong><\/p>\n\n\n\n<p><strong>\u00a0<\/strong>In an ideal world, users would never make any typos while searching for something. However, that is not the world we live in, and if you want your users to have a pleasant experience, you have got to handle at least an edit distance of 1. Therefore, the real question is: How can we make fuzzy string matching while minimizing relevance loss?<\/p>\n\n\n\n<p>We can take advantage of one characteristic of most search engine frameworks: A match with a lower edit distance will usually score higher. That characteristic allows us to combine those two queries with different fuzziness levels into one:<\/p>\n\n\n<p>[crayon lang=&#8221;java&#8221; decode=&#8221;true&#8221;]String indexName = &#8220;movies_index&#8221;;<br \/>\nString word = &#8220;Book&#8221;;<br \/>\nMatchQuery titleFuzzy = SearchQuery.match(word).fuzziness(1).field(&#8220;title&#8221;);<br \/>\nMatchQuery titleSimple = SearchQuery.match(word).field(&#8220;title&#8221;);<br \/>\nDisjunctionQuery ftsQuery = SearchQuery.disjuncts(titleSimple, titleFuzzy);<\/p>\n<p>SearchQueryResult result = movieRepository.getCouchbaseOperations().getCouchbaseBucket().query(<br \/>\nnew SearchQuery(indexName, ftsQuery).highlight().limit(20));\u00a0printResults(result);[\/crayon]<\/p>\n\n\n\n<p>Here is the result of the fuzzy query above:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]1) The Book Thief<br \/>\n     score: 2.398890092610849<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; Thief]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; Thief]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>2) The Book of Eli<br \/>\n     score: 2.398890092610849<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Eli]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Eli]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>3) The Book of Life<br \/>\n     score: 2.398890092610849<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Life]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Life]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) Black Book<br \/>\n     score: 2.398890092610849<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[Black &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[Black &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>5) The Jungle Book<br \/>\n     score: 2.398890092610849<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>6) The Jungle Book 2<br \/>\n     score: 1.958685557004688<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt; 2]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt; 2]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>7) National Treasure: Book of Secrets<br \/>\n     score: 1.6962714808368062<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[National Treasure: &lt;mark&gt;Book&lt;\/mark&gt; of Secrets]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[National Treasure: &lt;mark&gt;Book&lt;\/mark&gt; of Secrets]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>8) American Pie Presents: The Book of Love<br \/>\n     score: 1.517191317611584<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[American Pie Presents: The &lt;mark&gt;Book&lt;\/mark&gt; of Love]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[American Pie Presents: The &lt;mark&gt;Book&lt;\/mark&gt; of Love]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>9) Hook<br \/>\n     score: 0.5052232518679681<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:hook<br \/>\n          fragment:[&lt;mark&gt;Hook&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>10) Here Comes the Boom<br \/>\n     score: 0.357246781294941<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:boom<br \/>\n          fragment:[Here Comes the &lt;mark&gt;Boom&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>11) Look Who&#8217;s Talking Too<br \/>\n     score: 0.32331663301992025<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:look<br \/>\n          fragment:[&lt;mark&gt;Look&lt;\/mark&gt; Who&#8217;s Talking Too]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>12) Look Who&#8217;s Talking<br \/>\n     score: 0.32331663301992025<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:look<br \/>\n          fragment:[&lt;mark&gt;Look&lt;\/mark&gt; Who&#8217;s Talking]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>As you can see, this result is much closer to what the user might expect. Note that we are using a class called DisjunctionQuery now, disjunctions are an equivalent to the \u201c<strong>OR<\/strong>\u201d operator in SQL.<\/p>\n\n\n\n<p>What else could we improve to reduce the negative side effect of a fuzzy matching algorithm? Let\u2019s reanalyze our problem to understand if it needs further improvement:<\/p>\n\n\n\n<p>We already know that fuzzy lookups can produce some unexpected results (e.g. Book <strong>-&gt;<\/strong> Look, Hook). However, a single term search is usually a terrible query, as it barely gives us a hint of what exactly the user is trying to accomplish.<\/p>\n\n\n\n<p>Even Google, which has arguably one of the most highly developed fuzzy search algorithms in use, does not know exactly what I\u2019m looking for when I search for \u201c<strong>table<\/strong>\u201d:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5869\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/Screen-Shot-2018-10-08-at-11.45.33-AM.png\" alt=\"google search result for table\" width=\"619\" height=\"899\"><\/p>\n\n\n\n<p>So, what is the average length of keywords in a search query? To answer this question, I will show a graph from <a href=\"https:\/\/www.slideshare.net\/randfish\/keepng-up-wth-seo-n-2017-beyond\/11-Keyword_Length_of_Search_Queries1Word\">Rand Fishkin\u2019s 2016 presentation<\/a>. (He is one of the most famous gurus in the SEO world)<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5870\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/Screen-Shot-2018-10-08-at-12.19.18-PM-1024x517-1.png\" alt=\"keyword length on search queries\" width=\"900\" height=\"454\"><\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>According to the graph above, <strong>~80%<\/strong> of the search queries have 2 or more keywords, so let\u2019s try to search for the movie \u201cBlack Book\u201d using fuzziness 1:<\/p>\n\n\n<p>[crayon lang=&#8221;java&#8221; decode=&#8221;true&#8221;]String indexName = &#8220;movies_index&#8221;;<br \/>\nMatchQuery query = SearchQuery.match(&#8220;Black Book&#8221;).field(&#8220;title&#8221;).fuzziness(1);<br \/>\nSearchQueryResult result = movieRepository.getCouchbaseOperations().getCouchbaseBucket().query(<br \/>\nnew SearchQuery(indexName, query).highlight().limit(12));<\/p>\n<p>printResults(movies);[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>Result:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]1) Black Book<br \/>\n     score: 0.6946442424065404<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[&lt;mark&gt;Black&lt;\/mark&gt; &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:black<br \/>\n          fragment:[&lt;mark&gt;Black&lt;\/mark&gt; &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>2) Hook<br \/>\n     score: 0.40139742528039857<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:hook<br \/>\n          fragment:[&lt;mark&gt;Hook&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>3) Attack the Block<br \/>\n     score: 0.2838308365090324<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:block<br \/>\n          fragment:[Attack the &lt;mark&gt;Block&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) Here Comes the Boom<br \/>\n     score: 0.2838308365090324<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:boom<br \/>\n          fragment:[Here Comes the &lt;mark&gt;Boom&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>5) Look Who&#8217;s Talking Too<br \/>\n     score: 0.25687349813115684<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:look<br \/>\n          fragment:[&lt;mark&gt;Look&lt;\/mark&gt; Who&#8217;s Talking Too]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>6) Look Who&#8217;s Talking<br \/>\n     score: 0.25687349813115684<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:look<br \/>\n          fragment:[&lt;mark&gt;Look&lt;\/mark&gt; Who&#8217;s Talking]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>7) Grosse Pointe Blank<br \/>\n     score: 0.2317469073782136<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:blank<br \/>\n          fragment:[Grosse Pointe &lt;mark&gt;Blank&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>8) The Book Thief<br \/>\n     score: 0.19059065534780495<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; Thief]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>9) The Book of Eli<br \/>\n     score: 0.19059065534780495<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Eli]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>10) The Book of Life<br \/>\n     score: 0.19059065534780495<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of Life]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>11) The Jungle Book<br \/>\n     score: 0.19059065534780495<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The Jungle &lt;mark&gt;Book&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>12) Back to the Future<br \/>\n     score: 0.17061000968368<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:back<br \/>\n          fragment:[&lt;mark&gt;Back&lt;\/mark&gt; to the Future]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n[\/crayon]<\/p>\n\n\n\n<p>Not bad. We got the movie we were searching for as the first result. However, a disjunction query would still bring a better set of results.<\/p>\n\n\n\n<p>But still, looks like we have a new nice property here; the side effect of fuzziness matching slightly decreases as the number of keywords increases. A search for \u201c<strong>Black Book<\/strong>\u201d with fuzziness <strong>1<\/strong> can still bring results like back look or lack cook (some combinations with edit distance 1), but these are unlikely to be real movie titles.<\/p>\n\n\n\n<p>A search for \u201c<strong>book eli<\/strong>\u201d with fuzziness 2 would still bring it as the third result:<\/p>\n\n\n<p>[crayon lang=&#8221;java&#8221; decode=&#8221;true&#8221;]String indexName = &#8220;movies_index&#8221;;<br \/>\nMatchQuery query = SearchQuery.match(&#8220;book eli&#8221;).field(&#8220;title&#8221;).fuzziness(2);<br \/>\nSearchQueryResult result = movieRepository.getCouchbaseOperations().getCouchbaseBucket().query(<br \/>\nnew SearchQuery(indexName, query).highlight().limit(12));<\/p>\n<p>printResults(movies);[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]1) Ed Wood<br \/>\n     score: 0.030723793900031805<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:wood<br \/>\n          fragment:[&lt;mark&gt;Ed&lt;\/mark&gt; &lt;mark&gt;Wood&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:ed<br \/>\n          fragment:[&lt;mark&gt;Ed&lt;\/mark&gt; &lt;mark&gt;Wood&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>2) Man of Tai Chi<br \/>\n     score: 0.0271042761982626<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:chi<br \/>\n          fragment:[Man of &lt;mark&gt;Tai&lt;\/mark&gt; &lt;mark&gt;Chi&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:tai<br \/>\n          fragment:[Man of &lt;mark&gt;Tai&lt;\/mark&gt; &lt;mark&gt;Chi&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>3) The Book of Eli<br \/>\n     score: 0.02608335441670756<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:eli<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of &lt;mark&gt;Eli&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:book<br \/>\n          fragment:[The &lt;mark&gt;Book&lt;\/mark&gt; of &lt;mark&gt;Eli&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>4) The Good Lie<br \/>\n     score: 0.02439822770591834<br \/>\n     Hit Locations:<br \/>\n          field:title<br \/>\n          term:lie<br \/>\n          fragment:[The &lt;mark&gt;Good&lt;\/mark&gt; &lt;mark&gt;Lie&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n          field:title<br \/>\n          term:good<br \/>\n          fragment:[The &lt;mark&gt;Good&lt;\/mark&gt; &lt;mark&gt;Lie&lt;\/mark&gt;]<br \/>\n          &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n[\/crayon]<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>However, as the average English word is 5 letters long, I would <strong>NOT<\/strong> recommend using an edit distance bigger than 2 unless the user is searching for long words that are easy to misspell, like \u201cSchwarzenegger\u201d for instance (at least for non-Germans or non-Austrians).<\/p>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>\u00a0<\/p>\n\n\n\n<p>In this article, we discussed fuzziness matching and how to overcome its major side effect without messing up with its relevance. Mind you, fuzzy matching is just one of the many features which you should take advantage of while implementing a relevant and user-friendly search. We are going to discuss some of them during this series: N-Grams, Stopwords, Steeming, Shingle, Elision. Etc.<\/p>\n\n\n\n<p>Check out also the <a href=\"https:\/\/www.couchbase.com\/blog\/why-you-should-avoid-like-deep-dive-on-fts-part-1\/\">Part 1<\/a> and <a href=\"https:\/\/www.couchbase.com\/blog\/how-analyzers-tokenizers-filters-work-fts-part-2\/\">Part 2<\/a> of this series.<\/p>\n\n\n\n<p>In the meantime, if you have any questions, tweet me at <a href=\"https:\/\/twitter.com\/deniswsrosa\">@deniswsrosa<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you sound yourself asking the question, \u201cWhat is fuzzy matching?\u201d Fuzzy matching allows you to identify non-exact matches of your target item. It is the foundation stone of many search engine frameworks and one of the main reasons why you can get relevant search results even if you have a typo in your query [&hellip;]<\/p>\n","protected":false},"author":8754,"featured_media":1388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[324,144],"tags":[],"ppma_author":[287],"class_list":["post-1389","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-full-text-search","category-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>What is Fuzzy Matching? String-Searching Algorithms + Example<\/title>\n<meta name=\"description\" content=\"What is fuzzy matching? Learn different string-searching algorithms you can use and examples of how to overcome major side effect without losing relevance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/pt\/fuzzy-matching\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Is Fuzzy Matching and How to Use It Correctly\" \/>\n<meta property=\"og:description\" content=\"What is fuzzy matching? Learn different string-searching algorithms you can use and examples of how to overcome major side effect without losing relevance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/fuzzy-matching\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-09T07:44:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/fuzzy-matching-blogbanner.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1575\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Denis Rosa, Developer Advocate, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@deniswsrosa\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Denis Rosa, Developer Advocate, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/\"},\"author\":{\"name\":\"Denis Rosa, Developer Advocate, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/fe3c5273e805e72a5294611a48f62257\"},\"headline\":\"What Is Fuzzy Matching and How to Use It Correctly\",\"datePublished\":\"2018-10-09T07:44:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/\"},\"wordCount\":2352,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/fuzzy-matching-blogbanner.jpg\",\"articleSection\":[\"Full-Text Search\",\"Java\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/\",\"name\":\"What is Fuzzy Matching? String-Searching Algorithms + Example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/fuzzy-matching-blogbanner.jpg\",\"datePublished\":\"2018-10-09T07:44:26+00:00\",\"description\":\"What is fuzzy matching? Learn different string-searching algorithms you can use and examples of how to overcome major side effect without losing relevance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/fuzzy-matching-blogbanner.jpg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/fuzzy-matching-blogbanner.jpg\",\"width\":1575,\"height\":628},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/fuzzy-matching\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What Is Fuzzy Matching and How to Use It Correctly\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/fe3c5273e805e72a5294611a48f62257\",\"name\":\"Denis Rosa, Developer Advocate, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=gbe0716f6199cfb09417c92cf7a8fa8d6\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g\",\"caption\":\"Denis Rosa, Developer Advocate, Couchbase\"},\"description\":\"Denis Rosa is a Developer Advocate for Couchbase and lives in Munich - Germany. He has a solid experience as a software engineer and speaks fluently Java, Python, Scala and Javascript. Denis likes to write about search, Big Data, AI, Microservices and everything else that would help developers to make a beautiful, faster, stable and scalable app.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/deniswsrosa\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/pt\\\/author\\\/denis-rosa\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"What is Fuzzy Matching? String-Searching Algorithms + Example","description":"What is fuzzy matching? Learn different string-searching algorithms you can use and examples of how to overcome major side effect without losing relevance.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/pt\/fuzzy-matching\/","og_locale":"pt_BR","og_type":"article","og_title":"What Is Fuzzy Matching and How to Use It Correctly","og_description":"What is fuzzy matching? Learn different string-searching algorithms you can use and examples of how to overcome major side effect without losing relevance.","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/fuzzy-matching\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-10-09T07:44:26+00:00","og_image":[{"width":1575,"height":628,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/fuzzy-matching-blogbanner.jpg","type":"image\/jpeg"}],"author":"Denis Rosa, Developer Advocate, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@deniswsrosa","twitter_misc":{"Written by":"Denis Rosa, Developer Advocate, Couchbase","Est. reading time":"8 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/"},"author":{"name":"Denis Rosa, Developer Advocate, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/fe3c5273e805e72a5294611a48f62257"},"headline":"What Is Fuzzy Matching and How to Use It Correctly","datePublished":"2018-10-09T07:44:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/"},"wordCount":2352,"commentCount":2,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/fuzzy-matching-blogbanner.jpg","articleSection":["Full-Text Search","Java"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/","url":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/","name":"What is Fuzzy Matching? String-Searching Algorithms + Example","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/fuzzy-matching-blogbanner.jpg","datePublished":"2018-10-09T07:44:26+00:00","description":"What is fuzzy matching? Learn different string-searching algorithms you can use and examples of how to overcome major side effect without losing relevance.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/fuzzy-matching-blogbanner.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/fuzzy-matching-blogbanner.jpg","width":1575,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/fuzzy-matching\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What Is Fuzzy Matching and How to Use It Correctly"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/fe3c5273e805e72a5294611a48f62257","name":"Denis Rosa, Developer Advocate, Couchbase","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=gbe0716f6199cfb09417c92cf7a8fa8d6","url":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8d1f5c13115122cab89d0f229b904480bfe20d3dfbb093fe9734cda5235d419?s=96&d=mm&r=g","caption":"Denis Rosa, Developer Advocate, Couchbase"},"description":"Denis Rosa is a Developer Advocate for Couchbase and lives in Munich - Germany. He has a solid experience as a software engineer and speaks fluently Java, Python, Scala and Javascript. Denis likes to write about search, Big Data, AI, Microservices and everything else that would help developers to make a beautiful, faster, stable and scalable app.","sameAs":["https:\/\/x.com\/deniswsrosa"],"url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/denis-rosa\/"}]}},"acf":[],"authors":[{"term_id":287,"user_id":8754,"is_guest":0,"slug":"denis-rosa","display_name":"Denis Rosa, Developer Advocate, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/1389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/8754"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=1389"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/1389\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/1388"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=1389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=1389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=1389"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=1389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}