Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

scroll #

Moves a search cursor forward.

A search cursor is created by a search API call, with a scroll value provided.

Results returned by a scroll request reflect the state of the index at the time of the initial search request, like a fixed snapshot. Subsequent changes to documents do not affect the scroll results.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/_scroll/<scrollId>[?scroll=<time to live>]
Method: GET

Other protocols #

Copied to clipboard!
{
  "controller": "document",
  "action": "scroll",
  "scrollId": "<scrollId>",
  "scroll": "<time to live>"
}

Arguments #

  • collection: collection name
  • index: index name
  • scrollId: cursor unique identifier, obtained by either a search or a scroll query

Optional: #

  • scroll: refresh the cursor duration, using the time to live syntax.

Response #

Returns a paginated search result set, with the following properties:

  • hits: array of found documents. Each document has the following properties:
    • _id: document unique identifier
    • _score: relevance score
    • _source: new document content
  • scrollId: identifier to the next page of result. Can be different than the previous one(s)
  • total: total number of found documents. Usually greater than the number of documents in a result page
Copied to clipboard!
{
  "status": 200,
  "error": null,
  "action": "scroll",
  "controller": "document",
  "requestId": "<unique request identifier>",
  "result": {
    "scrollId": "<new scroll id>",
    "hits": [
      {
        "_id": "<document unique identifier>",
        "_score": 1,
        "_source": {
          // document content
        }
      },
      {
        "_id": "<another document unique identifier>",
        "_score": 1,
        "_source": {
          // document content
        }
      }
    ],
    "total": 42
  }
}