scroll method

Future<Map<String, dynamic>> scroll(
  1. String index,
  2. String collection,
  3. String scrollId, {
  4. String? 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.

Implementation

Future<Map<String, dynamic>> scroll(
  String index,
  String collection,
  String scrollId, {
  String? scroll,
}) async {
  final response = await kuzzle.query(KuzzleRequest(
    controller: name,
    action: 'scroll',
    index: index,
    collection: collection,
    scrollId: scrollId,
    scroll: scroll,
  ));

  return response.result as Map<String, dynamic>;
}