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.
The maximum value for a scroll session can be configured under the configuration key services.storageEngine.maxScrollDuration
.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_scroll/<scrollId>[?scroll=<time to live>]
Method: GET
Other protocols #
{
"controller": "document",
"action": "scroll",
"scrollId": "<scrollId>",
"scroll": "<time to live>"
}
Arguments #
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.
Kourou #
kourou document:scroll -a scrollId=<scrollId> -a scroll=<time to live>
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 contenthighlight
: optional result from highlight APIinner_hits
: optional result from inner_hits APIAvailable since 2.14.1
remaining
: remaining documents that can be fetchedAvailable since 2.4.0scrollId
: 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
{
"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
}
}
Edit this page on Github(opens new window)