gpt4 book ai didi

elasticsearch - Elasticsearch滚动不起作用

转载 作者:行者123 更新时间:2023-12-02 22:19:26 24 4
gpt4 key购买 nike

我正在运行以下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":[]}}

好像滚动不适用于聚合。

任何建议将不胜感激。

最佳答案

official documentation on scrolling:

If the request specifies aggregations, only the initial search response will contain the aggregations results.

关于elasticsearch - Elasticsearch滚动不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39773743/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com