Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 2.02 KB

File metadata and controls

35 lines (24 loc) · 2.02 KB
code type title description
true
page
scroll | Framework | Core
Repository.scroll method

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>;

Arguments Type Description
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:

Field Type Description
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