I have a query which I need to filter out results.
This is my query
{
"query": {
"filtered": {
"query": {
"multi_match": {
"default_operator": "AND",
"fields": [
"author",
"title",
"publisher",
"year"
],
"query": "George Orwell"
}
},
"filter": {
"terms": {
"year": [
1980,
1981
]
}
}
}
}
}
I get an error saying no [query] registered for [filtered]
. I clearly have a query for the filtered field. I am following the format given in the filtered query documentation on the elasticsearch page.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-filtered-query.html