Cezar
Cezar

Reputation: 3

Elasticsearch index_not_found_exception

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?

Upvotes: 0

Views: 6189

Answers (1)

Val
Val

Reputation: 217314

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
    }
  }
}

Upvotes: 1

Related Questions