# New index from existing index

**URL:** <https://discuss.elastic.co/t/new-index-from-existing-index/225231>\
**Category:** Elasticsearch\
**Created:** [March 26, 2020, 3:48pm UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231 "2020-03-26T15:48:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBH](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SBH](https://discuss.elastic.co/u/SBH)\
**Post date:** [March 26, 2020, 3:48pm UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/1 "2020-03-26T15:48:33Z")

</div>

Hi,

Is it possible to create a new index in Elastic, from an existing index, fx if you want to flatten your index?

Regards

Søren

---

<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:** [March 26, 2020, 5:09pm UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/2 "2020-03-26T17:09:51Z")

</div>

The reindex API would help?

---

<div class="post-metadata">

**Author:** ![SBH](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SBH](https://discuss.elastic.co/u/SBH)\
**Post date:** [March 27, 2020, 7:17am UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/3 "2020-03-27T07:17:01Z")

</div>

Yeah probably. So would it be possible to have one index coming from fx Logstash continously, and if the need would come to have another index, fx a flattened one from the original index, then would it be possible to create the new index from the first index and then it would always be up to date?

Regards

Søren

---

<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:** [March 27, 2020, 8:59am UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/4 "2020-03-27T08:59:25Z")

</div>

Reindex API is a one shot operation. It does not run in the background to monitor changes from the source index.

---

<div class="post-metadata">

**Author:** ![SBH](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SBH](https://discuss.elastic.co/u/SBH)\
**Post date:** [April 21, 2020, 9:25am UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/5 "2020-04-21T09:25:28Z")

</div>

What would be the best approach. To run the operation through Logstash again in order to apply the correct filters?

So setup Logstash to extract the index from Elastic and let Logstash do it's filter plugins and the apply the output to a new index?

---

<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:** [April 21, 2020, 2:13pm UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/6 "2020-04-21T14:13:04Z")

</div>

Yes why not. Sounds like a good approach to me.

---

<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:** [May 19, 2020, 2:13pm UTC](https://discuss.elastic.co/t/new-index-from-existing-index/225231/7 "2020-05-19T14:13:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
