elasticsearch - 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
}
}
}
推荐阅读
- linkedin - LinkedIn Lead Gen webhook 使用 Google Analytics 参数连接到 Pardot
- bootstrap-4 - 需要帮助配置 Bootstrap
- android - 亚马逊的 DynomoDb 依赖问题
- flutter - 在 Dart / Flutter 中重新实例化 Class 变量
- html - 如何使这个选择元素响应指针?
- snowflake-cloud-data-platform - 无法识别时间戳“xxxx-xx-xxTxx:xx:xx+xxxx”
- python - 如果转置数据集中满足条件,如何聚合?
- python - Django3.2 python迁移未设置默认值
- css - R Shiny CSS:删除特定行之间的空间,同时保持所有其他间距不变
- python - 功率计 - Modbus RS485 - 5 到 6 小时后,设备不再响应