繁体   English   中英

Elasticsearch滚动不起作用

[英]Elasticsearch scroll not working

我正在运行以下Elasticsearch聚合查询

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":[]}}

好像滚动不适用于聚合。

任何建议将不胜感激。

滚动官方文档

如果请求指定聚合,则仅初始搜索响应将包含聚合结果。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM