# Reindex Java API in 5.6.3

**URL:** <https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763>\
**Category:** Elasticsearch\
**Created:** [October 17, 2018, 6:35am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763 "2018-10-17T06:35:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)\
**Post date:** [October 17, 2018, 6:35am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/1 "2018-10-17T06:35:16Z")

</div>

Currently I'm using 1.x elastic search. I want to migrate the data to 5.6.3 directly. I saw reindex from remote is an option. But is there any java api to do reindex from remote in 5.6.3? or via curl is only way?? I'm unable to find doc related to that

---

<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:** [October 17, 2018, 6:55am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/2 "2018-10-17T06:55:46Z")

</div>

Why do you think you would need to do that from Java code?  
It's more an admin task to me...

Anyway, here is a sample code I wrote which does similar thing (not the remote part though - but you should be able to adapt it I think):

> <https://github.com/dadoonet/fscrawler/blob/master/elasticsearch-client/src/main/java/fr/pilato/elasticsearch/crawler/fs/client/ElasticsearchClient.java#L211-L239>

---

<div class="post-metadata">

**Author:** ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)\
**Post date:** [October 17, 2018, 7:05am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/3 "2018-10-17T07:05:56Z")

</div>

ok.. I have to migrate to 5.6 from 1.x, but I cant have two cluster boxes, I would prefer to do migration in the same box,isn't it possible by any other means?

---

<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:** [October 17, 2018, 7:57am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/4 "2018-10-17T07:57:05Z")

</div>

Doing that from Java code and having only one machine is not related. I don't understand.

---

<div class="post-metadata">

**Author:** ![RAM\_NATHAN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_nathan/32/50393_2.png) [@RAM\_NATHAN](https://discuss.elastic.co/u/RAM_NATHAN)\
**Post date:** [October 22, 2018, 6:00am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/5 "2018-10-22T06:00:08Z")

</div>

Sorry for not being clear. Forget java code. I want to migrate from 1.\* to 5.6.3 elasticsearch. I cant afford having another elasticsearch box as mentioned in " [reindex-from-remote](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-reindex.html#reindex-from-remote) " here. Is there any other way for direct migration?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 22, 2018, 6:07am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/6 "2018-10-22T06:07:27Z")

</div>

If you have enough disk space and system resources to run two nodes with different versions on the same host you can do that and use reindex from remote.

---

<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:** [November 19, 2018, 6:19am UTC](https://discuss.elastic.co/t/reindex-java-api-in-5-6-3/152763/7 "2018-11-19T06:19:56Z")

</div>

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