Different behavior with minimum_should_match on ES2.4 and ES7.1


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

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