gpt4 book ai didi

Elasticsearch : Unknown key for a VALUE_STRING in [scroll]

转载 作者:行者123 更新时间:2023-12-02 22:15:55 33 4
gpt4 key购买 nike

Elasticsearch scroll api 给了我这个错误

{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "Unknown key for a VALUE_STRING in [scroll].",
"line": 2,
"col": 15
}
],
"type": "parsing_exception",
"reason": "Unknown key for a VALUE_STRING in [scroll].",
"line": 2,
"col": 15
},
"status": 400
}

我使用滚动 api 获取文档的代码是
GET index/type/_search?scroll=1m
{
"size": 1000,
"query": {
"match_all": {}
}
}

这给了我很好的结果 "_scroll_id"
{
"_scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAB1dFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdXxZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlRAAAAAAAAHV4WYlFub1RHeHhRQVNUcXNXV0kwem45UQAAAAAAAB1gFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdYhZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlR",
"took": 37,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},

现在根据文档我应该这样做
GET /_search
{
"scroll": "1m",
"scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAB1dFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdXxZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlRAAAAAAAAHV4WYlFub1RHeHhRQVNUcXNXV0kwem45UQAAAAAAAB1gFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdYhZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlR"
}

这给了我上述错误。我是否以错误的方式使用滚动 API?
ES 版本为 5.5.1,kibana 版本为 5.5.1。我正在使用 kibana 访问 ES 服务器。

最佳答案

问题是我需要有

GET /_search/scroll
{
"scroll": "1m",
"scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAB1dFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdXxZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlRAAAAAAAAHV4WYlFub1RHeHhRQVNUcXNXV0kwem45UQAAAAAAAB1gFmJRbm9UR3h4UUFTVHFzV1dJMHpuOVEAAAAAAAAdYhZiUW5vVEd4eFFBU1Rxc1dXSTB6bjlR"
}

我忘了加 /scroll之后 _search .它现在有效

关于 Elasticsearch : Unknown key for a VALUE_STRING in [scroll],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46336470/

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