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

    FieldDescription
    tookThe amount of time in milliseconds OpenSearch needed to complete the operation.
    timed_outWhether any update requests during the operation timed out.
    totalTotal number of documents processed.
    updatedTotal number of documents updated.
    batchesNumber of scroll responses the request processed.
    version_conflictsNumber of conflicts the request ran into.
    noopsHow many update requests OpenSearch ignored during the operation. This field always returns 0.
    retriesThe number of bulk and search retry requests.
    throttled_millisNumber of throttled milliseconds during the request.
    requests_per_secondNumber of requests executed per second during the operation.
    throttled_until_millisThe amount of time until OpenSearch executes the next throttled request. Always equal to 0 in an update by query request.
    failuresAny failures that occur during the request.