# "minimum\_should\_match":"100%" vs "type": "phrase"

**URL:** <https://discuss.elastic.co/t/minimum-should-match-100-vs-type-phrase/50727>\
**Category:** Elasticsearch\
**Created:** [May 23, 2016, 2:02pm UTC](https://discuss.elastic.co/t/minimum-should-match-100-vs-type-phrase/50727 "2016-05-23T14:02:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cedric\_MONCADE](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@Cedric\_MONCADE](https://discuss.elastic.co/u/Cedric_MONCADE)\
**Post date:** [May 23, 2016, 2:02pm UTC](https://discuss.elastic.co/t/minimum-should-match-100-vs-type-phrase/50727/1 "2016-05-23T14:02:27Z")

</div>

Hi,

I'm new in Elasticsearch query and I'm wondering what is the difference between

"minimum\_should\_match":"100%" and "type": "phrase"?  
example:

```auto
{
    "match": {
        "tags": {
            "query": "My text",
            "minimum_should_match":"100%"
        }
    }
}

```

and

```auto
{
    "match": {
        "tags": {
            "query": "My text",
            "type": "phrase"
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [May 23, 2016, 5:18pm UTC](https://discuss.elastic.co/t/minimum-should-match-100-vs-type-phrase/50727/2 "2016-05-23T17:18:38Z")

</div>

The `"minimum_should_match": "100%"` becomes a `bool` query with `term` queries in the must array. Er, well, it doesn't become that, but at some layer of abstraction they are the same.

The `"type": "phrase"` one becomes a phrase query.

The minimum\_should\_match one will be faster because it just checks that terms are in the text you are matching. The phrase one will be slower because it makes sure that the terms are close together. The "how close together?" setting is `slop`.

The two queries are scored a bit differently too: since the `minimum_should_match` one never gets positional information it just uses frequencies of the terms. Because the phrase one _does_ get positional information it uses the relative closeness of the terms and the frequencies.

"How much slower?" and "how different is the scoring?" are kind of fuzzy and dependent on the data you are working with, the RAM you have free for the disk cache, whether positional information is hot in the cache, if you've recorded offsets in the positions, and lots of other stuff I'm forgetting right now.

---

<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:** [July 5, 2017, 10:49pm UTC](https://discuss.elastic.co/t/minimum-should-match-100-vs-type-phrase/50727/3 "2017-07-05T22:49:45Z")

</div>


