# Need Help regarding renaming index

**URL:** <https://discuss.elastic.co/t/need-help-regarding-renaming-index/689>\
**Category:** Elasticsearch\
**Created:** [May 14, 2015, 2:19pm UTC](https://discuss.elastic.co/t/need-help-regarding-renaming-index/689 "2015-05-14T14:19:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phani\_Nadiminti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phani_nadiminti/32/45381_2.png) [@Phani\_Nadiminti](https://discuss.elastic.co/u/Phani_Nadiminti)\
**Post date:** [May 14, 2015, 2:19pm UTC](https://discuss.elastic.co/t/need-help-regarding-renaming-index/689/1 "2015-05-14T14:19:56Z")

</div>

Hi All,

is it possible to rename index/mapping in elastic search using Java API or using any HTTP requests.  
I read knapsack plugin in es but i didn't found java API to rename index/mapping please suggest me any ways to rename index in elastic search how to achieve this feature.

phani

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 14, 2015, 2:22pm UTC](https://discuss.elastic.co/t/need-help-regarding-renaming-index/689/2 "2015-05-14T14:22:45Z")

</div>

Sorry, renaming indexes isn't possible. You'll have to reindex the data into a new index. Mappings don't have names so I'm not sure what you mean by renaming a mapping.

---

<div class="post-metadata">

**Author:** ![Phani\_Nadiminti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phani_nadiminti/32/45381_2.png) [@Phani\_Nadiminti](https://discuss.elastic.co/u/Phani_Nadiminti)\
**Post date:** [May 14, 2015, 2:26pm UTC](https://discuss.elastic.co/t/need-help-regarding-renaming-index/689/3 "2015-05-14T14:26:22Z")

</div>

Thank you magnus for quick reply sorry I mean to say it is indextype. can we rename indextype ?

is it also not possible with knapsack plugin?

Thanks,  
phani

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 14, 2015, 2:48pm UTC](https://discuss.elastic.co/t/need-help-regarding-renaming-index/689/4 "2015-05-14T14:48:16Z")

</div>

Assuming you're talking about _document_ types, no, they can't be renamed without reindexing.

---

<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:14am UTC](https://discuss.elastic.co/t/need-help-regarding-renaming-index/689/5 "2017-07-06T00:14:03Z")

</div>


