no [query] registered for [filtered]

The filtered query has been deprecated and removed in ES 5.0. You should now use the bool/must/filter query instead.

{
    "query": {
        "bool": {
            "must": {
                "multi_match": {
                    "operator": "and",
                    "fields": [
                        "author",
                        "title",
                        "publisher",
                        "year"
                    ],
                    "query": "George Orwell"
                }
            },
            "filter": {
                "terms": {
                    "year": [
                        1980,
                        1981
                    ]
                }
            }
        }
    }
}

Here are the differences between the two queries:

3,4c3,4
<         "bool": {
<             "must": {
---
>         "filtered": {
>             "query": {
6c6
<                     "operator": "and",
---
>                     "default_operator": "AND",

PS: the reference page you’re looking at is located in the “deleted pages” of the appendix, so it’s not part of the main documentation anymore.

Leave a Comment