我正在运行以下弹性搜索聚合查询
curl -XPOST 'http://localhost:9200/ae2015/_search/?scroll=1m' -d '{
"size" : 0,
"query":{"constant_score":{"filter": {"geo_bounding_box" : {"location": {"top_left" : [-180, 85],"bottom_right" : [180, -85]}}}}},
"aggs":{
"grid": {
"geohash_grid": {"field":"location","precision": 3},
"aggs": {
"count":{"sum":{"field":"count"}}
}
}
}
}'
这会按预期返回一个scroll_id,但是当我使用它时,响应为"为空",即
{"_scroll_id":"xxx","took":936,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":13238893,"max_score":0.0,"hits":[]}}
好像滚动不适用于聚合。
非常感谢任何建议。