Update by query
You can include a query and a script as part of your update request so OpenSearch can run the script to update all of the documents that match the query.
Path and HTTP methods
All URL parameters are optional.
Request body
Response body fields
Field | Description |
---|---|
took | The amount of time in milliseconds OpenSearch needed to complete the operation. |
timed_out | Whether any update requests during the operation timed out. |
total | Total number of documents processed. |
updated | Total number of documents updated. |
batches | Number of scroll responses the request processed. |
version_conflicts | Number of conflicts the request ran into. |
noops | How many update requests OpenSearch ignored during the operation. This field always returns 0. |
retries | The number of bulk and search retry requests. |
throttled_millis | Number of throttled milliseconds during the request. |
requests_per_second | Number of requests executed per second during the operation. |
throttled_until_millis | The amount of time until OpenSearch executes the next throttled request. Always equal to 0 in an update by query request. |
failures | Any failures that occur during the request. |