# New Reindex API also for Java?

**URL:** <https://discuss.elastic.co/t/new-reindex-api-also-for-java/50052>\
**Category:** Elasticsearch\
**Created:** [May 14, 2016, 4:13pm UTC](https://discuss.elastic.co/t/new-reindex-api-also-for-java/50052 "2016-05-14T16:13:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![knob1](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@knob1](https://discuss.elastic.co/u/knob1)\
**Post date:** [May 14, 2016, 4:13pm UTC](https://discuss.elastic.co/t/new-reindex-api-also-for-java/50052/1 "2016-05-14T16:13:18Z")

</div>

Hi,

I googled & searched the documentation, but I didn't find any example code where the new reindex API is used from Java. Is there a way?  
Is anyone using it in Java and could post some example code?

Thanks!

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [May 15, 2016, 3:10am UTC](https://discuss.elastic.co/t/new-reindex-api-also-for-java/50052/2 "2016-05-15T03:10:42Z")

</div>

> [@knob1](#):
>
> Is anyone using it in Java and could post some example code?

[This](https://github.com/elastic/elasticsearch/blob/2.x/modules/reindex/src/test/java/org/elasticsearch/index/reindex/ReindexTestCase.java) shows how to build the requests. Just make sure that you've configured the `reindex` module as a dependency and added it when creating the client. Sorry about this. It is super convenient that \_reindex is a module instead of directly in Elasticsearch's core for everyone _except_ folks who want to use it from the java api.

---

<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:51pm UTC](https://discuss.elastic.co/t/new-reindex-api-also-for-java/50052/3 "2017-07-05T22:51:24Z")

</div>


