# Delete alias

**URL:** https://discuss.elastic.co/t/delete-alias/32959
**Category:** Elasticsearch
**Created:** [October 26, 2015, 7:38am UTC](https://discuss.elastic.co/t/delete-alias/32959 "2015-10-26T07:38:50Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![kodermax](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kodermax](https://discuss.elastic.co/u/kodermax)
#### Post date: [October 26, 2015, 7:38am UTC](https://discuss.elastic.co/t/delete-alias/32959/1 "2015-10-26T07:38:51Z")

</div>

Why When I remove alias, my index removed too?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 26, 2015, 7:39am UTC](https://discuss.elastic.co/t/delete-alias/32959/2 "2015-10-26T07:39:31Z")

</div>

No it's not. You are doing something else I think.

---

<div class="post-metadata">

### Author: ![kodermax](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kodermax](https://discuss.elastic.co/u/kodermax)
#### Post date: [October 26, 2015, 7:41am UTC](https://discuss.elastic.co/t/delete-alias/32959/3 "2015-10-26T07:41:44Z")

</div>

Now I make index "portal" then i make request

```
/POST /_aliases
{
    "actions": [
         { "add": { "index": "portal", "alias": "portal_v1" }}
    ]
}

```

and then i make request  
/DELETE /portal\_v1/

and my index portal removed too. why?

---

<div class="post-metadata">

### Author: ![kodermax](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kodermax](https://discuss.elastic.co/u/kodermax)
#### Post date: [October 26, 2015, 7:56am UTC](https://discuss.elastic.co/t/delete-alias/32959/4 "2015-10-26T07:56:50Z")

</div>

if i have alias poral\_v1,  
i can't make request

```
/POST /_aliases
    {
        "actions": [
            { "add": { "index": "portal", "alias": "portal_v1" }}
        ]
    }

```

i see

```
{
error: "InvalidAliasNameException[[portal] Invalid alias name [portal_v1], an index exists with the same name as the alias]"
status: 400
}
```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 26, 2015, 8:14am UTC](https://discuss.elastic.co/t/delete-alias/32959/5 "2015-10-26T08:14:55Z")

</div>

Read the doc on how to remove an alias: [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#indices-aliases](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#indices-aliases)

---

<div class="post-metadata">

### Author: ![kodermax](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kodermax](https://discuss.elastic.co/u/kodermax)
#### Post date: [October 26, 2015, 10:31am UTC](https://discuss.elastic.co/t/delete-alias/32959/6 "2015-10-26T10:31:41Z")

</div>

I understood this theme, but when i reindex data to new index, my new index not save mapping old index, yes?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 26, 2015, 11:30am UTC](https://discuss.elastic.co/t/delete-alias/32959/7 "2015-10-26T11:30:22Z")

</div>

I don't understand.

What do you want to do?

---

<div class="post-metadata">

### Author: ![kodermax](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kodermax](https://discuss.elastic.co/u/kodermax)
#### Post date: [October 26, 2015, 1:44pm UTC](https://discuss.elastic.co/t/delete-alias/32959/8 "2015-10-26T13:44:48Z")

</div>

For example,  
I make operations from article [https://www.elastic.co/blog/changing-mapping-with-zero-downtime](https://www.elastic.co/blog/changing-mapping-with-zero-downtime)

and when i reindex data from my\_index\_v1 to my\_index\_v2, mappings of my\_index\_v1 doesn't move to my\_index\_v2.  
understand?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 26, 2015, 4:10pm UTC](https://discuss.elastic.co/t/delete-alias/32959/9 "2015-10-26T16:10:07Z")

</div>

So what do you want to do?

Reindex from one index to another one and change the mapping ?  
Or keep the same mapping ? (if so, why do you want to reindex?)

---

<div class="post-metadata">

### Author: ![kodermax](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kodermax](https://discuss.elastic.co/u/kodermax)
#### Post date: [October 27, 2015, 6:10am UTC](https://discuss.elastic.co/t/delete-alias/32959/10 "2015-10-27T06:10:26Z")

</div>

i want to, when i cope data from index1 to index2 all mapping from index1 was copied to index2.  
it turns out if i want to move all mapings of index 1 to index 2, i must create these mappings on the index2 before reindex data?

---

<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: [July 5, 2017, 11:42pm UTC](https://discuss.elastic.co/t/delete-alias/32959/11 "2017-07-05T23:42:31Z")

</div>


