IFulltextQueryTDocumentScroll 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
C#
IFulltextQuery<TDocument> Scroll(
	out ScrollToken token
)

Parameters

token  ScrollToken
The scroll token for the query.

Return Value

IFulltextQueryTDocument
The 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();

See Also