# ES1 vs ES7 - Different results when dis\_max wrapped with should

**URL:** <https://discuss.elastic.co/t/es1-vs-es7-different-results-when-dis-max-wrapped-with-should/213951>\
**Category:** Elasticsearch\
**Created:** [January 6, 2020, 10:40pm UTC](https://discuss.elastic.co/t/es1-vs-es7-different-results-when-dis-max-wrapped-with-should/213951 "2020-01-06T22:40:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xlisfo](https://avatars.discourse-cdn.com/v4/letter/x/a8b319/32.png) [@xlisfo](https://discuss.elastic.co/u/xlisfo)\
**Post date:** [January 6, 2020, 10:40pm UTC](https://discuss.elastic.co/t/es1-vs-es7-different-results-when-dis-max-wrapped-with-should/213951/1 "2020-01-06T22:40:41Z")

</div>

Hi, I have a question for the Elasticsearch query below. The dis\_max clause actually returns 0 results for both Elasticsearch 1.7 and 7.4. Then when I use bool-\>should wrap the dis\_max clause, for Elasticsearch 1.7, all the documents in the index were returned. On the other hand, the same query returned 0 documents for Elasticsearch 7.4. Could someone help me explain the logic and what changed from 1.7 to 7.4?

Thanks,

```
{
  "query": {
    "bool": {
      "should": [
        {
          "dis_max": {
            "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:** [February 3, 2020, 10:44pm UTC](https://discuss.elastic.co/t/es1-vs-es7-different-results-when-dis-max-wrapped-with-should/213951/2 "2020-02-03T22:44:04Z")

</div>

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