# Nested Boolean Queries (should) ES 5.0

**URL:** <https://discuss.elastic.co/t/nested-boolean-queries-should-es-5-0/67668>\
**Category:** Elasticsearch\
**Created:** [November 30, 2016, 7:16pm UTC](https://discuss.elastic.co/t/nested-boolean-queries-should-es-5-0/67668 "2016-11-30T19:16:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![magicalbanana](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@magicalbanana](https://discuss.elastic.co/u/magicalbanana)\
**Post date:** [November 30, 2016, 7:16pm UTC](https://discuss.elastic.co/t/nested-boolean-queries-should-es-5-0/67668/1 "2016-11-30T19:16:52Z")

</div>

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

---

<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:** [December 28, 2016, 7:16pm UTC](https://discuss.elastic.co/t/nested-boolean-queries-should-es-5-0/67668/2 "2016-12-28T19:16:52Z")

</div>

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