IFulltext QueryTDocumentScroll Method
Returns the scroll token for a query. Supported with Manticore 7.0.0 and up.
Definition
Namespace: SphinxConnector.FluentApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.2.0
The current instance.
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 6.2.0
C#
IFulltextQuery<TDocument> Scroll(
out ScrollToken token
)VB
Function Scroll (
<OutAttribute> ByRef token As ScrollToken
) As IFulltextQuery(Of TDocument)Parameters
- token ScrollToken
- The scroll token for the query.
Return Value
IFulltextQueryTDocumentThe current instance.
Example
C#
var firstResult = await FulltextSession.Query<Book>().
OrderBy(x => x.ReleaseDate).
ThenBy(x => x.Id).
Limit(0, 20).
Scroll(out ScrollToken token).
ToListAsync();
//Usually you'd persist the scroll token somewhere and retrieve it for the next query
var secondResult = await FulltextSession.Query<Book>().
Limit(0, 20).
Scroll(out ScrollToken nextToken).
Options(o => o.Scroll(token.Value)).
ToListAsync();