# Moving data from one index to another

**URL:** <https://discuss.elastic.co/t/moving-data-from-one-index-to-another/6064>\
**Category:** Elasticsearch\
**Created:** [December 5, 2011, 5:08am UTC](https://discuss.elastic.co/t/moving-data-from-one-index-to-another/6064 "2011-12-05T05:08:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BARNEY](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@BARNEY](https://discuss.elastic.co/u/BARNEY)\
**Post date:** [December 5, 2011, 5:08am UTC](https://discuss.elastic.co/t/moving-data-from-one-index-to-another/6064/1 "2011-12-05T05:08:31Z")

</div>

Any java API to copy the data from one index to another index and  
delete the copied data from old index as soon as it gets copied?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 5, 2011, 7:23pm UTC](https://discuss.elastic.co/t/moving-data-from-one-index-to-another/6064/2 "2011-12-05T19:23:10Z")

</div>

No, you need to write it yourself.

On Mon, Dec 5, 2011 at 7:08 AM, BARNEY [kalyanc007@gmail.com](mailto:kalyanc007@gmail.com) wrote:

> Any java API to copy the data from one index to another index and  
> delete the copied data from old index as soon as it gets copied?

---

<div class="post-metadata">

**Author:** ![BARNEY](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@BARNEY](https://discuss.elastic.co/u/BARNEY)\
**Post date:** [December 6, 2011, 5:04am UTC](https://discuss.elastic.co/t/moving-data-from-one-index-to-another/6064/3 "2011-12-06T05:04:12Z")

</div>

> <https://github.com/karussell/Jetwick/blob/master/src/main/java/de/jetwick/es/AbstractElasticSearch.java>

I am taking the above site as reference.will I get better results with it  
if I have large size indices?

On Tue, Dec 6, 2011 at 12:53 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> No, you need to write it yourself.
> 
> On Mon, Dec 5, 2011 at 7:08 AM, BARNEY [kalyanc007@gmail.com](mailto:kalyanc007@gmail.com) wrote:
> 
> > Any java API to copy the data from one index to another index and  
> > delete the copied data from old index as soon as it gets copied?

---

<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, 3:46am UTC](https://discuss.elastic.co/t/moving-data-from-one-index-to-another/6064/4 "2017-07-06T03:46:20Z")

</div>


