# How to use match\_phrase and fuzzy query at the same time

**URL:** <https://discuss.elastic.co/t/how-to-use-match-phrase-and-fuzzy-query-at-the-same-time/254201>\
**Category:** Elasticsearch\
**Created:** [November 4, 2020, 5:10am UTC](https://discuss.elastic.co/t/how-to-use-match-phrase-and-fuzzy-query-at-the-same-time/254201 "2020-11-04T05:10:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taichi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taichi/32/46431_2.png) [@taichi](https://discuss.elastic.co/u/taichi)\
**Post date:** [November 4, 2020, 5:10am UTC](https://discuss.elastic.co/t/how-to-use-match-phrase-and-fuzzy-query-at-the-same-time/254201/1 "2020-11-04T05:10:11Z")

</div>

I'd like to search documents by phrases and do not need to match all the words included in the phrases, but only some (specified) words / characters. For example,

```
{
  "match_phrase": {
    "target_field": {
      "query": "This is the phrase"
    }
  }
}

```

I do not need exactly match `This is the phrase`, but also want to get documents only with `is the phrase` or `This is the phras`.

Is there any ways to add some fuzziness to match\_phrase query like this?

My question is very similar to this ([Match\_phrase + fuzziness query porting from ES 1.7.x to ES 7.1.x](https://discuss.elastic.co/t/match-phrase-fuzziness-query-porting-from-es-1-7-x-to-es-7-1-x/207109)), but there are no answers yet.  
Also I do not want to use `span` queries because the query will be very long.

---

<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 2, 2020, 5:31am UTC](https://discuss.elastic.co/t/how-to-use-match-phrase-and-fuzzy-query-at-the-same-time/254201/3 "2020-12-02T05:31:56Z")

</div>

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