See reindex API.
BulkByScrollResponse response = ReindexAction.INSTANCE.newRequestBuilder(client)
Optionally a query can provided to filter what documents should be
re-indexed from the source to the target index.
Thanks for subscribing! We'll keep you updated with new releases.