# Endless creating index after delete another index

**URL:** <https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334>\
**Category:** Elasticsearch\
**Created:** [August 28, 2018, 12:07pm UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334 "2018-08-28T12:07:50Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![lunatic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lunatic/32/55516_2.png) [@lunatic](https://discuss.elastic.co/u/lunatic)\
**Post date:** [September 3, 2018, 4:24am UTC](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334/5 "2018-09-03T04:24:22Z")

</div>

Solved by allocating all the failed shards instead of deleting them.

```auto
POST /_cluster/reroute
{
  "commands": [
    {
      "allocate_empty_primary": {
        "index": "nginx_log-2018-06-20",
        "shard": 0,
        "node": "uL9qINwtQqmMpSEnugloEg",
        "accept_data_loss": true
      }
    }
  ]
}

```

After allocated these indices , you can delete them.

Note: this operation may cause data loss.

---

_[View the full topic](https://discuss.elastic.co/t/endless-creating-index-after-delete-another-index/146334)._
