以前用的是es1.6,现在打算升级到6.0,有一些api和语法都变了,求助这段查询怎么改6.0才能用?
{
"aggs": {
"filterName0": {
"filter": {
"and": [
{
"matchAll": {}
}
]
},
"aggs": {
"outerGroup0": {
"nested": {
"path": "consuming_behavior"
},
"aggs": {
"outerGroup0o": {
"terms": {
"field": "consuming_behavior.second_level_type",
"include": "ZDY00011"
},
"aggs": {
"innerGroup0": {
"nested": {
"path": "consuming_behavior.health_record"
},
"aggs": {
"innerGroup0i": {
"terms": {
"field": "consuming_behavior.health_record.value",
"order": {
"_count": "desc"
},
"size": 2147483647
}
}
}
}
}
}
}
}
}
}
}
}
在1.6中能够使用,但是在 6.0中报错
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[and] query malformed, no start_object after query name",
"line": 1,
"col": 41
}
],
"type": "parsing_exception",
"reason": "[and] query malformed, no start_object after query name",
"line": 1,
"col": 41
},
"status": 400