# Fuzziness above 2 distance or 60% levenshtein match

**URL:** <https://discuss.elastic.co/t/fuzziness-above-2-distance-or-60-levenshtein-match/159898>\
**Category:** Elasticsearch\
**Created:** [December 7, 2018, 10:07am UTC](https://discuss.elastic.co/t/fuzziness-above-2-distance-or-60-levenshtein-match/159898 "2018-12-07T10:07:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amol\_Hegana](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Amol\_Hegana](https://discuss.elastic.co/u/Amol_Hegana)\
**Post date:** [December 7, 2018, 10:07am UTC](https://discuss.elastic.co/t/fuzziness-above-2-distance-or-60-levenshtein-match/159898/1 "2018-12-07T10:07:38Z")

</div>

Right now fuzziness covers only till 2 distance. Can we increase it?  
I have keywords stored in elastic let take one "theeventandfood", I am reading ocr lines where i am expecting errors and that allowed error percentage is 60%. Based on this 60% plus match i want suggest keywords.

I am expecting approximate match using levenshtein formula.  
examples above keyword should be suggested if ocr reads following  
eventmdfood  
theermdfood  
eventfood  
theeve1ifood

Already tried Fuzziness and ngram.

Fuzziness has limit of max distance 2 where as ngram analyzer not working for me as I need settings based on length of keyword read from ocr. I am not getting what should be the correct value for min and max gram.

Thanks

---

<div class="post-metadata">

**Author:** ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)\
**Post date:** [December 14, 2018, 9:38am UTC](https://discuss.elastic.co/t/fuzziness-above-2-distance-or-60-levenshtein-match/159898/2 "2018-12-14T09:38:15Z")

</div>

we only support LD/Fuzziness \<= 2 the reason is that the underlying implementation would _explode_ if we'd allow more. A dynamic programming approach of implementing it would be dramatically slower and be linear to the number of terms. so, no we can't increase it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 11, 2019, 9:38am UTC](https://discuss.elastic.co/t/fuzziness-above-2-distance-or-60-levenshtein-match/159898/3 "2019-01-11T09:38:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
