# Match\_phrase + fuzziness query porting from ES 1.7.x to ES 7.1.x

**URL:** <https://discuss.elastic.co/t/match-phrase-fuzziness-query-porting-from-es-1-7-x-to-es-7-1-x/207109>\
**Category:** Elasticsearch\
**Created:** [November 8, 2019, 12:25pm UTC](https://discuss.elastic.co/t/match-phrase-fuzziness-query-porting-from-es-1-7-x-to-es-7-1-x/207109 "2019-11-08T12:25:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joneslee85](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joneslee85/32/20980_2.png) [@joneslee85](https://discuss.elastic.co/u/joneslee85)\
**Post date:** [November 8, 2019, 12:25pm UTC](https://discuss.elastic.co/t/match-phrase-fuzziness-query-porting-from-es-1-7-x-to-es-7-1-x/207109/1 "2019-11-08T12:25:59Z")

</div>

Here is my ES 1.7.x `match_phrase` query with `fuzziness`

```auto
# https://www.elastic.co/guide/en/elasticsearch/reference/1.7/query-dsl-match-query.html
# ES 1.7.x
{
  "match_phrase": {
    "highlightable": {
      "query": "this_is_the_phrase",
      "slop": 10,
      # Handle mis-spellings within the phrase.
      "fuzziness" => 1.0
    }
  }
}

```

I would like to ask if there is any equivalent query in ES 7.1.x that support `fuzziness` option for a `match_phrase` query? AFAIK the `fuzziness` option is [only available for `match` query](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html).

Much thanks in advance

EDIT:

I found out there is a way to use `span` combination, see [answer on StackOverflow](https://stackoverflow.com/a/38823174). However this way is quite cumbersome as it is required that phrase needs to be manually tokenized then automatically get parsed to create list of `span` queries.

---

<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:** [December 6, 2019, 12:26pm UTC](https://discuss.elastic.co/t/match-phrase-fuzziness-query-porting-from-es-1-7-x-to-es-7-1-x/207109/2 "2019-12-06T12:26:10Z")

</div>

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