Core
Framework v2.x
2

scroll() #

Moves a search cursor forward.

A search cursor is created by a Repository.search function call, with a scroll option value provided.

Arguments #

scroll(scrollId: string, ttl?: string): Promise<any>;

ArgumentsTypeDescription
scrollId
string
Scroll unique identifier, obtained by the last search/scroll function call (scroll identifiers may change from page to page)
ttl
string
Refreshes the cursor duration, using the time to live syntax

Return #

The scroll function returns a promise resolving to a search result object, with the following properties:

FieldTypeDescription
hits
any[]
Found documents. If a ObjectConstructor argument was provided to the repository constructor, then each hit is an instance of that class instead of a raw object
total
integer
Total number of found documents. Can be greater than the number of documents returned in this result set