Throttle a reindex operation
- POST /_reindex/{task_id}/_rethrottle
Change the maximum number of documents to index per second for a particular reindex operation. For example, to unthrottle to unlimited documents per second:
POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
Rethrottling that speeds up the query takes effect immediately. Rethrottling that slows down the query will take effect after completing the current batch of documents. This behavior prevents scroll timeouts.
This API follows reindex tasks across node-shutdown relocations, so callers can keep using the original task ID throughout the lifetime of the operation. The relocated task ID is also accepted and is followed transparently. In either case, returned task IDs and timings reflect the original task, not its relocated successor.
The rethrottle may not have been applied to any tasks if either node_failures or task_failures are non-empty, or if the response contains
no successfully rethrottled tasks — that is, no entries under nodes (returned with the default
group_by=nodes in stack) or under tasks (returned in serverless, or in stack with
group_by=none or group_by=parents).
Response
-
node_failuresobject -
Node-level failures encountered while applying the rethrottle request. Will return a
failed_node_exceptionwrapping ano_such_node_exception, if a node handling the task either never existed, or has left the cluster, and one of the following is true:- The task has completed.
- The task cannot be found.
NoteRethrottle handles relocations, so it should succeed if the task can be found and has not completed.