Nested Boolean Queries (should) ES 5.0

This query used to work before I upgraded to ElasticSearch 5.0

GET test/test_entry/_search

{
  "query": {
    "bool": {
      "should": [
        {
          "query": {
            "bool": {
              "must": [
                {
                  "match_phrase": {
                    "last_name": "doe"
                  }
                },
                {
                  "prefix": {
                    "first_name": "j"
                  }
                },
                {
                  "nested": {
                    "path": "date_of_birth_list",
                    "query": {
                      "match": {
                        "date_of_birth_list.date_of_birth": "1976"
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      ]
    }
  }
}

But now when I run it I am getting this error

{
  "error": {
    "root_cause": [
      {
        "type": "parsing_exception",
        "reason": "no [query] registered for [query]",
        "line": 1,
        "col": 38
      }
    ],
    "type": "parsing_exception",
    "reason": "no [query] registered for [query]",
    "line": 1,
    "col": 38
  },
  "status": 400
}

Any help would be appreciated

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