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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With