Throttle a delete by query operation Added in 6.5.0

POST /_delete_by_query/{task_id}/_rethrottle

Change the number of requests per second for a particular delete by query operation. Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.

Path parameters

  • task_id string | number Required

    The ID for the task.

Query parameters

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • node_failures array[object]
      Hide node_failures attributes Show node_failures attributes object
      • type string Required

        The type of error

      • reason string

        A human-readable explanation of the error, in english

      • The server stack trace. Present only if the error_trace=true parameter was sent with the request.

      • Additional properties are allowed.

      • root_cause array[object]

        Additional properties are allowed.

      • suppressed array[object]

        Additional properties are allowed.

    • task_failures array[object]
      Hide task_failures attributes Show task_failures attributes object
      • task_id number Required
      • node_id string Required
      • status string Required
      • reason object Required

        Additional properties are allowed.

        Hide reason attributes Show reason attributes object
        • type string Required

          The type of error

        • reason string

          A human-readable explanation of the error, in english

        • The server stack trace. Present only if the error_trace=true parameter was sent with the request.

        • Additional properties are allowed.

        • root_cause array[object]

          Additional properties are allowed.

        • suppressed array[object]

          Additional properties are allowed.

    • nodes object

      Task information grouped by node, if group_by was set to node (the default).

      Hide nodes attribute Show nodes attribute object
      • * object Additional properties

        Additional properties are allowed.

        Hide * attributes Show * attributes object
        • name string
        • host string
        • ip string
        • roles array[string]
        • Hide attributes attribute Show attributes attribute object
          • * string Additional properties
        • tasks object Required
          Hide tasks attribute Show tasks attribute object
          • * object Additional properties

            Additional properties are allowed.

            Hide * attributes Show * attributes object
            • action string Required
            • cancelled boolean
            • cancellable boolean Required
            • Human readable text that identifies the particular request that the task is performing. For example, it might identify the search request being performed by a search task. Other kinds of tasks have different descriptions, like _reindex which has the source and the destination, or _bulk which just has the number of requests and the destination indices. Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.

            • headers object Required
              Hide headers attribute Show headers attribute object
              • * string Additional properties
            • id number Required
            • node string Required
            • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • Time unit for nanoseconds

            • Time unit for milliseconds

            • status object

              The internal status of the task, which varies from task to task. The format also varies. While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.

              Additional properties are allowed.

            • type string Required
    • tasks array[object] | object

      One of:
      Hide attributes Show attributes object
      • action string Required
      • cancelled boolean
      • cancellable boolean Required
      • Human readable text that identifies the particular request that the task is performing. For example, it might identify the search request being performed by a search task. Other kinds of tasks have different descriptions, like _reindex which has the source and the destination, or _bulk which just has the number of requests and the destination indices. Many requests will have only an empty description because more detailed information about the request is not easily available or particularly helpful in identifying the request.

      • headers object Required
        Hide headers attribute Show headers attribute object
        • * string Additional properties
      • id number Required
      • node string Required
      • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

      • Time unit for nanoseconds

      • Time unit for milliseconds

      • status object

        The internal status of the task, which varies from task to task. The format also varies. While the goal is to keep the status for a particular task consistent from version to version, this is not always possible because sometimes the implementation changes. Fields might be removed from the status for a particular request so any parsing you do of the status might break in minor releases.

        Additional properties are allowed.

      • type string Required
POST /_delete_by_query/{task_id}/_rethrottle
curl \
 -X POST http://api.example.com/_delete_by_query/{task_id}/_rethrottle
Response examples (200)
{
  "node_failures": [
    {
      "type": "string",
      "reason": "string",
      "stack_trace": "string",
      "caused_by": {},
      "root_cause": [
        {}
      ],
      "suppressed": [
        {}
      ]
    }
  ],
  "task_failures": [
    {
      "task_id": 42.0,
      "node_id": "string",
      "status": "string",
      "reason": {
        "type": "string",
        "reason": "string",
        "stack_trace": "string",
        "caused_by": {},
        "root_cause": [
          {}
        ],
        "suppressed": [
          {}
        ]
      }
    }
  ],
  "nodes": {
    "additionalProperty1": {
      "name": "string",
      "transport_address": "string",
      "host": "string",
      "ip": "string",
      "roles": [
        "string"
      ],
      "attributes": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "tasks": {
        "additionalProperty1": {
          "action": "string",
          "cancelled": true,
          "cancellable": true,
          "description": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "id": 42.0,
          "node": "string",
          "running_time": "string",
          "": "string",
          "status": {},
          "type": "string"
        },
        "additionalProperty2": {
          "action": "string",
          "cancelled": true,
          "cancellable": true,
          "description": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "id": 42.0,
          "node": "string",
          "running_time": "string",
          "": "string",
          "status": {},
          "type": "string"
        }
      }
    },
    "additionalProperty2": {
      "name": "string",
      "transport_address": "string",
      "host": "string",
      "ip": "string",
      "roles": [
        "string"
      ],
      "attributes": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "tasks": {
        "additionalProperty1": {
          "action": "string",
          "cancelled": true,
          "cancellable": true,
          "description": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "id": 42.0,
          "node": "string",
          "running_time": "string",
          "": "string",
          "status": {},
          "type": "string"
        },
        "additionalProperty2": {
          "action": "string",
          "cancelled": true,
          "cancellable": true,
          "description": "string",
          "headers": {
            "additionalProperty1": "string",
            "additionalProperty2": "string"
          },
          "id": 42.0,
          "node": "string",
          "running_time": "string",
          "": "string",
          "status": {},
          "type": "string"
        }
      }
    }
  },
  "": [
    {
      "action": "string",
      "cancelled": true,
      "cancellable": true,
      "description": "string",
      "headers": {
        "additionalProperty1": "string",
        "additionalProperty2": "string"
      },
      "id": 42.0,
      "node": "string",
      "running_time": "string",
      "": "string",
      "status": {},
      "type": "string"
    }
  ]
}