這是因爲從es的5.0版本開始,原先的filtered語句,形如
{
"query": {
"filtered": {
"bool": {
"filter": {
"range": {
"age": {
"gt": 26
}
}
},
"must": {
"match": {
"last_name": "smith"
}
}
}
}
}
}
被淘汰,對應的替換語法是
{
"query": {
"bool": {
"filter": {
"range": {
"age": {
"gt": 26
}
}
},
"must": {
"match": {
"last_name": "smith"
}
}
}
}
}