简体   繁体   English

为什么此ElasticSearch扫描和滚动返回IndexMissingException

[英]Why does this ElasticSearch scan and scroll returns IndexMissingException

I run the following: 我运行以下命令:

curl -XGET 'http://my_address/my_index/_search?scroll=1m&size=10&search_type=scan' -d '{'query':{'match_all':{}}}'

It returns a scroll id (very long), and I then use in the first scroll request: 它返回一个滚动id(很长),然后在第一个滚动请求中使用:

curl -XGET 'http://my_address/my_index/_search/scroll?scroll=1m' -d '<scroll_id>'

It returns an error: {"error":"IndexMissingException[[my_index] missing]","status":404} 它返回错误:{“错误”:“ IndexMissingException [[my_index]丢失]”,“状态”:404}

I do not know why having this error. 我不知道为什么会有这个错误。 I follow the guideline in https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html step by step. 我会逐步遵循https://www.elastic.co/guide/zh-CN/elasticsearch/reference/current/search-request-scroll.html中的指南。

What is going on? 到底是怎么回事?

因为您的第二个请求(即使用scroll_id )不应获取任何索引,而是这样读取:

curl -XGET 'http://my_address/_search/scroll?scroll=1m' -d '<scroll_id>'

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

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