# How Elasticsearch handles conflicts between alias name and index name

**URL:** https://discuss.elastic.co/t/how-elasticsearch-handles-conflicts-between-alias-name-and-index-name/18860
**Category:** Elasticsearch
**Created:** [July 24, 2014, 12:27pm UTC](https://discuss.elastic.co/t/how-elasticsearch-handles-conflicts-between-alias-name-and-index-name/18860 "2014-07-24T12:27:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Giovanni\_Gaglione](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giovanni_gaglione/32/1370_2.png) [@Giovanni\_Gaglione](https://discuss.elastic.co/u/Giovanni_Gaglione)
#### Post date: [July 24, 2014, 12:27pm UTC](https://discuss.elastic.co/t/how-elasticsearch-handles-conflicts-between-alias-name-and-index-name/18860/1 "2014-07-24T12:27:12Z")

</div>

Hi,

Let's say I have 2 indices: \*one whose name is index\_name and an other  
index with alias \*_index\_name (called second\_index)._

In this way there is a conflict.

_How ElasticSearch handles such situation?_

Does it give priority to the alias (this means when you are using  
_index\_name_ it will refer to _second\_index_)?  
Or does it do the opposite (this means when you are using _index\_name_ it  
will refer to the first index called _index\_name_).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2bea2bee-0d43-4b81-a05c-f07f0f8496fc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2bea2bee-0d43-4b81-a05c-f07f0f8496fc%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Giovanni\_Gaglione](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giovanni_gaglione/32/1370_2.png) [@Giovanni\_Gaglione](https://discuss.elastic.co/u/Giovanni_Gaglione)
#### Post date: [July 24, 2014, 3:13pm UTC](https://discuss.elastic.co/t/how-elasticsearch-handles-conflicts-between-alias-name-and-index-name/18860/2 "2014-07-24T15:13:28Z")

</div>

Basically there will be no conflict, because Elasticsearch does not allow  
you to set an alias that is the same of an index name.

Solved!  
Thanks 🙂

On Thursday, July 24, 2014 2:27:12 PM UTC+2, Giovanni Gaglione wrote:

> Hi,
> 
> Let's say I have 2 indices: \*one whose name is index\_name and an other  
> index with alias \*_index\_name (called second\_index)._
> 
> In this way there is a conflict.
> 
> _How Elasticsearch handles such situation?_
> 
> Does it give priority to the alias (this means when you are using  
> _index\_name_ it will refer to _second\_index_)?  
> Or does it do the opposite (this means when you are using _index\_name_ it  
> will refer to the first index called _index\_name_).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/78ac7f7b-a2a9-4bbd-886a-c80d5b1560f0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/78ac7f7b-a2a9-4bbd-886a-c80d5b1560f0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:13am UTC](https://discuss.elastic.co/t/how-elasticsearch-handles-conflicts-between-alias-name-and-index-name/18860/3 "2017-07-06T01:13:26Z")

</div>


