Reindex APIedit

See reindex API.

BulkByScrollResponse response =
  new ReindexRequestBuilder(client, ReindexAction.INSTANCE)
    .source("source_index")
    .destination("target_index")
    .filter(QueryBuilders.matchQuery("category", "xzy")) 
    .get();

Optionally a query can provided to filter what documents should be re-indexed from the source to the target index.