# Levenshtein distance of 2 handles same Token differently?

**URL:** <https://discuss.elastic.co/t/levenshtein-distance-of-2-handles-same-token-differently/247065>\
**Category:** Elasticsearch\
**Created:** [September 1, 2020, 9:07am UTC](https://discuss.elastic.co/t/levenshtein-distance-of-2-handles-same-token-differently/247065 "2020-09-01T09:07:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![as\_ES](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@as\_ES](https://discuss.elastic.co/u/as_ES)\
**Post date:** [September 1, 2020, 9:07am UTC](https://discuss.elastic.co/t/levenshtein-distance-of-2-handles-same-token-differently/247065/1 "2020-09-01T09:07:25Z")

</div>

Hi,

I created two indices with the exact same mapping. The specific field has an EdgeNGram Tokenizer (Min:1 Max:50, keeping only Letters and Digits) and an analyzer with "lowercase", "asciifolding" and "synonym" filters.

When using a multi\_match query with fuzziness "AUTO:4,7":

- field containing "Hamburg-Strasse" matches Hamburg, Hambur, Hambu

But:

- field containing only "Hamburg" matches only Hamburg, Hambur

Would be thankful for any ide, what could be causing this.

**Edit** : Figured out its the max-expansions setting, still not understanding it completely.

Regards Alex

---

<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:** [September 29, 2020, 9:07am UTC](https://discuss.elastic.co/t/levenshtein-distance-of-2-handles-same-token-differently/247065/2 "2020-09-29T09:07:32Z")

</div>

Closed on September 29, 2020, 9:07am UTC

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