# How to disable delete from an alias which cover multiple indices?

**URL:** <https://discuss.elastic.co/t/how-to-disable-delete-from-an-alias-which-cover-multiple-indices/74872>\
**Category:** Elasticsearch\
**Created:** [February 13, 2017, 11:55am UTC](https://discuss.elastic.co/t/how-to-disable-delete-from-an-alias-which-cover-multiple-indices/74872 "2017-02-13T11:55:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrickXu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brickxu/32/15462_2.png) [@BrickXu](https://discuss.elastic.co/u/BrickXu)\
**Post date:** [February 13, 2017, 11:55am UTC](https://discuss.elastic.co/t/how-to-disable-delete-from-an-alias-which-cover-multiple-indices/74872/1 "2017-02-13T11:55:59Z")

</div>

Hi guys,

I create multiple indices with the following template:

```
{
  "order": 0,
  "template": "my-index-*",
  "settings": {},
  "mappings": {},
  "aliases": {
    "my-index": {}
  }
}

```

And insert some docs with a python script via bulk api, like the following:

```
green open my-index-1.14 1 0 4999 0 2.3mb 2.3mb 
green open my-index-1.15 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.16 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.17 1 0 4999 0 2.1mb 2.1mb 
green open my-index-1.10 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.11 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.12 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.1 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.2 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.3 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.4 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.5 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.6 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.7 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.8 1 0 4999 0 2.6mb 2.6mb 
green open my-index-1.9 1 0 4999 0 2.6mb 2.6mb 

```

The alias "my-index" work fine with query and filter, but if I send a delete index request with the alias:

`curl -XDELETE http://127.0.0.1:9200/my-index`

Elasticsearch remove all index with this alias, it looks very dangerous if I put an alias in all indices.

so my question is, how to disable delete request if it hit an alias ?

Thanks.

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [February 13, 2017, 3:02pm UTC](https://discuss.elastic.co/t/how-to-disable-delete-from-an-alias-which-cover-multiple-indices/74872/2 "2017-02-13T15:02:05Z")

</div>

Hi,

I think this issue ([https://github.com/elastic/elasticsearch/issues/2318](https://github.com/elastic/elasticsearch/issues/2318)) talks about this. Unfortunately it is not closed yet but it is on the radar.

---

<div class="post-metadata">

**Author:** ![BrickXu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brickxu/32/15462_2.png) [@BrickXu](https://discuss.elastic.co/u/BrickXu)\
**Post date:** [February 14, 2017, 6:47am UTC](https://discuss.elastic.co/t/how-to-disable-delete-from-an-alias-which-cover-multiple-indices/74872/3 "2017-02-14T06:47:10Z")

</div>

Hey @cbuescher, thanks so much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 14, 2017, 6:47am UTC](https://discuss.elastic.co/t/how-to-disable-delete-from-an-alias-which-cover-multiple-indices/74872/4 "2017-03-14T06:47:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
