0
在ES 2.2,我想下面的查询:elasticsearch子聚集失败
{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"range": {
"startDate": {
"gt": "2016-07-01"
}
}
}
}
},
"aggs": {
"numbera": {
"terms": {
"field": "numbera",
"size": 0,
"aggs": {
"some": {
"avg": {
"field": "callDuration"
}
}
}
}
}
}
}
它提供了以下错误:
{
"type": "search_parse_exception",
"reason": "Unknown key for a START_OBJECT in [numbera]: [aggs].",
"line": 20,
"col": 18
}
我很茫然,什么是错的查询?
从查询中删除子聚合给了我一个正确的结果。