ES1 vs ES7 - Different results when dis_max wrapped with should

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": [...
            ]
          }
        }
      ]
    }
  }
}
1 Like

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