# Fuzzy matching multi term query problem

**URL:** <https://discuss.elastic.co/t/fuzzy-matching-multi-term-query-problem/375896>\
**Category:** Elasticsearch\
**Created:** [March 14, 2025, 7:38am UTC](https://discuss.elastic.co/t/fuzzy-matching-multi-term-query-problem/375896 "2025-03-14T07:38:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mateo80](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@mateo80](https://discuss.elastic.co/u/mateo80)\
**Post date:** [March 14, 2025, 7:38am UTC](https://discuss.elastic.co/t/fuzzy-matching-multi-term-query-problem/375896/1 "2025-03-14T07:38:46Z")

</div>

Hi guys

Looks like I'm missing something obvious when trying to fuzzy match multi term query.

What I'd like to achieve is to get only "Goleniow Helenow" result when providing "Goleniow Heleniow" query (city + district name with typo). Instead I get all the docs.

Basically I think I've tried all combinations of **minimum\_should\_match** , **operator** and even **fuzziness** parameters with no satisfying result.

Anyone could point out what am I missing ?

Index setup

```auto
curl -X PUT "localhost:9200/test-index?pretty" -H 'Content-Type: application/json' -d'
{
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "properties": { 
      "name": { 
        "type": "text",
        "index": true
      } 
    } 
  }   
}'

```

Docs to index

```auto
curl -X POST "localhost:9200/test-index/_doc?pretty" -H 'Content-Type: application/json' -d'
{
  "name": "Goleniow Helenow"
}'
curl -X POST "localhost:9200/test-index/_doc?pretty" -H 'Content-Type: application/json' -d'
{
  "name": "Goleniow"
}'
curl -X POST "localhost:9200/test-index/_doc?pretty" -H 'Content-Type: application/json' -d'
{
  "name": "Goleniow Jaworow"
}'

```

Query and result

```auto
curl -X POST "localhost:9200/test-index/_search?pretty" -H 'Content-Type: application/json' -d'{
  "query": {
    "match": {
      "name": {
        "minimum_should_match": "100%",
        "operator": "and",
        "fuzziness": "2",
        "query": "Goleniow Heleniow"
      }
    }
  }
}'
{
  "took" : 104,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 3,
      "relation" : "eq"
    },
    "max_score" : 0.32180583,
    "hits" : [
      {
        "_index" : "test-index",
        "_id" : "Waqnj5UBnvH7uZURvQTX",
        "_score" : 0.32180583,
        "_source" : {
          "name" : "Goleniow Helenow"
        }
      },
      {
        "_index" : "test-index",
        "_id" : "Wqqoj5UBnvH7uZUR2QSO",
        "_score" : 0.2793999,
        "_source" : {
          "name" : "Goleniow"
        }
      },
      {
        "_index" : "test-index",
        "_id" : "W6qoj5UBnvH7uZUR8AT4",
        "_score" : 0.21600665,
        "_source" : {
          "name" : "Goleniow Jaworow"
        }
      }
    ]
  }
}

```
