# Creating New index from filtering existing index

**URL:** <https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503>\
**Category:** Elasticsearch\
**Created:** [May 7, 2020, 9:42am UTC](https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503 "2020-05-07T09:42:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarvendras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarvendras/32/46287_2.png) [@sarvendras](https://discuss.elastic.co/u/sarvendras)\
**Post date:** [May 7, 2020, 9:42am UTC](https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503/1 "2020-05-07T09:42:15Z")

</div>

HelloTeam,

I have a index with large volume fo data.I want to create new subset index by doing some filtering (for example Merchant number="something").How can I do this in elasticsearch.  
Please suggest.

Thanks  
Sarvendra

---

<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:** [May 7, 2020, 9:59am UTC](https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503/2 "2020-05-07T09:59:37Z")

</div>

You can use the reindex API for this.

---

<div class="post-metadata">

**Author:** ![sarvendras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarvendras/32/46287_2.png) [@sarvendras](https://discuss.elastic.co/u/sarvendras)\
**Post date:** [May 12, 2020, 7:03am UTC](https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503/3 "2020-05-12T07:03:50Z")

</div>

@dadoonet Please share an example..Thanks a lot..

---

<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:** [May 12, 2020, 8:37am UTC](https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503/4 "2020-05-12T08:37:27Z")

</div>

There is an example in the documentation. I guess you did not find it so here it is: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-select-query](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-select-query)

---

<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:** [June 9, 2020, 8:37am UTC](https://discuss.elastic.co/t/creating-new-index-from-filtering-existing-index/231503/5 "2020-06-09T08:37:31Z")

</div>

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