Reindex API

edit

See reindex API.

BulkByScrollResponse response =
    ReindexAction.INSTANCE.newRequestBuilder(client)
    .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.