# Different behavior with minimum\_should\_match on ES2.4 and ES7.1

**URL:** <https://discuss.elastic.co/t/different-behavior-with-minimum-should-match-on-es2-4-and-es7-1/214960>\
**Category:** Elasticsearch\
**Created:** [January 14, 2020, 9:03am UTC](https://discuss.elastic.co/t/different-behavior-with-minimum-should-match-on-es2-4-and-es7-1/214960 "2020-01-14T09:03:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oalfonso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oalfonso/32/60722_2.png) [@oalfonso](https://discuss.elastic.co/u/oalfonso)\
**Post date:** [January 14, 2020, 9:03am UTC](https://discuss.elastic.co/t/different-behavior-with-minimum-should-match-on-es2-4-and-es7-1/214960/1 "2020-01-14T09:03:07Z")

</div>

Hi,

First of all, disclaimer: we had to move long before to `ES7.X` but we are doing right now, from `2.4`, shame on us.

Well, my case: I've found that `minimum_should_match` has a different behavior when the param given is bigger than optionals. Query:

ES 2.4:

> ```
> {
> "query": {
> "bool": {
> "should": [
> {
> "match": {
> "myfield": {
> "query": "my_search_value",
> "boost": 150
> }
> }
> }
> ],
> "minimum_should_match": 2
> }
> }
> }
> 
> ```

Here, in `ES2.4`, giving `"minimum_should_match": 2` and just 1 optional, it ignores the `"minimum_should_match": 2` and returns everything that matches.

BUT, now, the same in `ES7.1` gives no results, I have to put `"minimum_should_match": 1` if I want to get the results.

Looks like `ES2.4` was setting `minimum_should_match` at the maximum number of optionals and now it's not doing that anymore, is this possible?

I tried to find this in documentation and change logs but I couldn't find anything.

Any ideas?  
Thanks in advance

---

<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:** [February 11, 2020, 9:03am UTC](https://discuss.elastic.co/t/different-behavior-with-minimum-should-match-on-es2-4-and-es7-1/214960/2 "2020-02-11T09:03:10Z")

</div>

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