# Modify elastic search index name using java api

**URL:** https://discuss.elastic.co/t/modify-elastic-search-index-name-using-java-api/20588
**Category:** Elasticsearch
**Created:** [November 5, 2014, 11:18pm UTC](https://discuss.elastic.co/t/modify-elastic-search-index-name-using-java-api/20588 "2014-11-05T23:18:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Subbarao\_Kondragunta](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Subbarao\_Kondragunta](https://discuss.elastic.co/u/Subbarao_Kondragunta)
#### Post date: [November 5, 2014, 11:18pm UTC](https://discuss.elastic.co/t/modify-elastic-search-index-name-using-java-api/20588/1 "2014-11-05T23:18:12Z")

</div>

Can we modify name of the index using java api? If so please post the lines  
of code to test.

--  
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/9742da95-5ef0-4061-a8b6-d921dc02cd54%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9742da95-5ef0-4061-a8b6-d921dc02cd54%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 5, 2014, 11:22pm UTC](https://discuss.elastic.co/t/modify-elastic-search-index-name-using-java-api/20588/2 "2014-11-05T23:22:04Z")

</div>

You cannot rename an index at all.

You can add an alias though.

On 6 November 2014 10:18, Subbarao Kondragunta [subbu2personal@gmail.com](mailto:subbu2personal@gmail.com)  
wrote:

> Can we modify name of the index using java api? If so please post the  
> lines of code to test.
> 
> --  
> 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/9742da95-5ef0-4061-a8b6-d921dc02cd54%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9742da95-5ef0-4061-a8b6-d921dc02cd54%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/9742da95-5ef0-4061-a8b6-d921dc02cd54%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9742da95-5ef0-4061-a8b6-d921dc02cd54%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAF3ZnZnyGXs2Pg5p\_SiuH40bYa197bRHeVPzLq6fFoC-ADaC5g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAF3ZnZnyGXs2Pg5p_SiuH40bYa197bRHeVPzLq6fFoC-ADaC5g%40mail.gmail.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, 12:51am UTC](https://discuss.elastic.co/t/modify-elastic-search-index-name-using-java-api/20588/3 "2017-07-06T00:51:58Z")

</div>


