弹性搜索 index_not_found_exception
Elasticsearch index_not_found_exception
由于我的错误,我删除了活动索引,现在 Elasticsearch 的 cronjob 引发了错误:
Current write index for app-write:
Checking results from _rollover call
Calculating next write index based on current write index...
Next write index for app-write: -000001
Checking if -000001 exists
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"-000001","index":"-000001"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"-000001","index":"-000001"},"status":404}
你知道如何解决这个问题吗?
如果您不小心删除了您的活动索引并且没有任何快照或备份,那么您将无法恢复您的数据。
但是,您可以通过使用以下命令重新创建活动索引来再次获取进程 运行(确保将 whatever_name_your_index_had
正确替换为您不小心删除的索引的实际名称):
PUT whatever_name_your_index_had-000001
{
"aliases": {
"app-write": {
"is_write_index": true
}
}
}
由于我的错误,我删除了活动索引,现在 Elasticsearch 的 cronjob 引发了错误:
Current write index for app-write:
Checking results from _rollover call
Calculating next write index based on current write index...
Next write index for app-write: -000001
Checking if -000001 exists
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"-000001","index":"-000001"}],"type":"index_not_found_exception","reason":"no such index","index_uuid":"_na_","resource.type":"index_or_alias","resource.id":"-000001","index":"-000001"},"status":404}
你知道如何解决这个问题吗?
如果您不小心删除了您的活动索引并且没有任何快照或备份,那么您将无法恢复您的数据。
但是,您可以通过使用以下命令重新创建活动索引来再次获取进程 运行(确保将 whatever_name_your_index_had
正确替换为您不小心删除的索引的实际名称):
PUT whatever_name_your_index_had-000001
{
"aliases": {
"app-write": {
"is_write_index": true
}
}
}