Query parameters

  • scrollstring

    The period to retain the search context for scrolling.

    Values are -1 or 0.

  • scroll_idstring Deprecated

    The scroll ID for scrolled search

  • If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object.

application/json

Body

  • scrollstring

    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.

  • scroll_idstring Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • tooknumber Required

      The number of milliseconds it took Elasticsearch to run the request. This value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response. It includes:

      • Communication time between the coordinating node and data nodes
      • Time the request spends in the search thread pool, queued for execution
      • Actual run time

      It does not include:

      • Time needed to send the request to Elasticsearch
      • Time needed to serialize the JSON response
      • Time needed to send the response to a client
    • timed_outboolean Required

      If true, the request timed out before completion; returned results may be partial or empty.

    • _shardsobject Required
      Hide _shards attributes Show _shards attributes object
      • failednumber Required
      • successfulnumber Required
      • totalnumber Required
      • failuresarray[object]
        Hide failures attributes Show failures attributes object
        • indexstring
        • nodestring
        • reasonobject Required

          Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

          Hide reason attributes Show reason attributes object
          • typestring Required

            The type of error

          • reasonstring | null

            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.

          • caused_byobject

            Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

          • root_causearray[object]

            Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

            Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

          • suppressedarray[object]

            Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

            Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

        • shardnumber Required
        • statusstring
      • skippednumber
    • hitsobject Required
      Hide hits attributes Show hits attributes object
    • _clustersobject
      Hide _clusters attributes Show _clusters attributes object
      • skippednumber Required
      • successfulnumber Required
      • totalnumber Required
      • runningnumber Required
      • partialnumber Required
      • failednumber Required
      • detailsobject
        Hide details attribute Show details attribute object
        • *object Additional properties
          Hide * attributes Show * attributes object
          • statusstring Required

            Values are running, successful, partial, skipped, or failed.

          • indicesstring Required
          • tooknumber

            Time unit for milliseconds

          • timed_outboolean Required
          • _shardsobject
            Hide _shards attributes Show _shards attributes object
          • failuresarray[object]
            Hide failures attributes Show failures attributes object
            • indexstring
            • nodestring
            • reasonobject Required

              Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.

            • shardnumber Required
            • statusstring
    • fieldsobject
      Hide fields attribute Show fields attribute object
      • *object Additional properties
    • max_scorenumber
    • profileobject
      Hide profile attribute Show profile attribute object
    • pit_idstring
    • suggestobject
      Hide suggest attribute Show suggest attribute object
GET /_search/scroll
GET /_search/scroll
{
  "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
}
resp = client.scroll(
    scroll_id="DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
)
const response = await client.scroll({
  scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
});
response = client.scroll(
  body: {
    "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
  }
)
$resp = $client->scroll([
    "body" => [
        "scroll_id" => "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
    ],
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"scroll_id":"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="}' "$ELASTICSEARCH_URL/_search/scroll"
Request example
Run `GET /_search/scroll` to get the next batch of results for a scrolling search.
{
  "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
}