# Create a new index from existing one and add new fields to the new index

**URL:** <https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626>\
**Category:** Elasticsearch\
**Created:** [June 22, 2016, 8:49am UTC](https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626 "2016-06-22T08:49:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![divya\_hc](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@divya\_hc](https://discuss.elastic.co/u/divya_hc)\
**Post date:** [June 22, 2016, 8:49am UTC](https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626/1 "2016-06-22T08:49:01Z")

</div>

Hi,  
I am creating an index on elastic search which has fields appgroupid, appid.  
But i need to add appgroupname and appname fields to this index.

I have an hashmap of appgroupid to appgroupname and appgroupid to appgroupname.

Once the first index is created, is there a way to create another index from index1 and add extra fields, whose values are derived from the hashmap based on approgroupid and appid.

Thanks,  
Divya

---

<div class="post-metadata">

**Author:** ![mainec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainec/32/5557_2.png) [@mainec](https://discuss.elastic.co/u/mainec)\
**Post date:** [June 22, 2016, 9:01am UTC](https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626/2 "2016-06-22T09:01:04Z")

</div>

You might want to check out the following blog post on reindex and update\_by\_query:

> **[Reindex is coming!
	  	 | Elastic](https://www.elastic.co/blog/reindex-is-coming)**
>
> \_reindex and \_update\_by\_query are coming to Elasticsearch 2.3.0 and 5.0.0-alpha1! Hurray! \_reindex reads documents from one index and writes them to another index. It can be used to copy documents fro...

Hope this helps,  
Isabel

---

<div class="post-metadata">

**Author:** ![divya\_hc](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@divya\_hc](https://discuss.elastic.co/u/divya_hc)\
**Post date:** [June 22, 2016, 5:15pm UTC](https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626/3 "2016-06-22T17:15:15Z")

</div>

Thanks Isabel for the pointers. \_reindex feature is in 2.3.0 release. Our current system is using 2.2.0, what are the options in 2.2.0 release?

---

<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:** [June 22, 2016, 8:27pm UTC](https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626/4 "2016-06-22T20:27:13Z")

</div>

Nothing internal, you would need to write code to handle it externally.

---

<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, 10:41pm UTC](https://discuss.elastic.co/t/create-a-new-index-from-existing-one-and-add-new-fields-to-the-new-index/53626/5 "2017-07-05T22:41:20Z")

</div>


