[英]ElasticSearch _reindex yields "no such index"
I have two instances of the same version of elasticsearch with the same data.我有两个具有相同数据的 elasticsearch 相同版本的实例。
I am now trying to _reindex
an index with:我现在正在尝试使用以下方法对索引进行
_reindex
:
curl -X POST -H 'Content-Type: application/json' 'localhost:9200/_reindex' -d '{"source": {"index": "my_index_v1"}, "dest": { "index": "my_index_v2" }}' | jq
On one of the machines, it works correctly and a new index is correctly created.在其中一台机器上,它工作正常并正确创建了一个新索引。 However on second machine, it ends with:
但是在第二台机器上,它以:
{
"error": {
"root_cause": [
{
"type": "index_not_found_exception",
"reason": "no such index [my_index_v2] and [action.auto_create_index] ([.watches,.triggered_watches,.watcher-history-*,.monitoring-*]) doesn't match",
"index_uuid": "_na_",
"index": "my_index_v2"
}
],
"type": "index_not_found_exception",
"reason": "no such index [my_index_v2] and [action.auto_create_index] ([.watches,.triggered_watches,.watcher-history-*,.monitoring-*]) doesn't match",
"index_uuid": "_na_",
"index": "my_index_v2"
},
"status": 404
}
I checked the elasticsearch.yml
and the file is completely equal on both machines and contains following:我检查了
elasticsearch.yml
文件在两台机器上完全相等,并且包含以下内容:
action.auto_create_index: .watches,.triggered_watches,.watcher-history-*,.monitoring-*
I have no idea why this happens.我不知道为什么会这样。
To be clear, the index really exists.需要明确的是,索引确实存在。
EDIT:编辑:
working machine工作机
non-working machine不工作的机器
From the diff it seems that the working machine contains also:从差异看来,工作机器还包含:
{
"persistent": {
"action": {
"auto_create_index": "true"
},
…
}
}
So I guess that can be the culprit.所以我想这可能是罪魁祸首。
Update auto_create_index in second machine as,将第二台机器中的auto_create_index更新为,
{
"persistent": {
"action": {
"auto_create_index": "true"
}
}
}
instead of代替
action.auto_create_index: .watches,.triggered_watches,.watcher-history-*,.monitoring-*
could likely fix the issue.可能会解决这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.