How to check progress of ElasticSearch's Reindex API

Viewed 5381

I'm trying to execute a reindex operation from remote ES 2.4 cluster via Reindex API. Which job is to transfer more then 100 million docs of an index to latest version of elasticsearch.

For the test case i'm trying it on small data set but i'm facing following issues.

issue:

  1. I can't see the progress of the of the script that how many docs are transfered and how many left.

  2. In case of failure, How can i resume the script instead of restarting again from 0.

1 Answers

You can use the Task management API to know the status of reindex, As suggested in the official doc of reindex API. from the same doc

If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of the task. Elasticsearch creates a record of this task as a document at .tasks/_doc/${taskId}. When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.

Related