Home > Blockchain >  Elasticsearch index_not_found_exception
Elasticsearch index_not_found_exception

Time:10-09

By my mistake I deleted active index and now Elasticsearch's cronjob raises error:

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}

Do you know any workaround how to resolve this problem?

CodePudding user response:

If you have deleted your active index by mistake and don't have any snapshot or backup, then you will not be able to restore your data.

However, you can get the process running again by recreating your active index with the command below (make sure to properly replace whatever_name_your_index_had by the actual name of the index you accidentally deleted):

PUT whatever_name_your_index_had-000001
{
  "aliases": {
    "app-write": {
      "is_write_index": true
    }
  }
}
  • Related