Paging a query result is the process of returning the results of a query in smaller subsets of data, or pages. Nowadays implementing pagination is a very common scenario for displaying results to a user in small, easy to manage chunks.
RavenDB allows query's result pagination and supports both Skip
and Take
LINQ operators, making paging through a collection easy. To perform paging you will call the Take
and Skip
operators on the Query
object to return a given number of elements and/or to skip over a given number of elements and then return the remainder.
As RavenDB is safe by default, it protects itself and user applications from overload scenarios and limits the number of documents to be returned to the client from the server. In large dataset scenarios it makes paging mandatory. This means that we need to ensure that we limit the result sets to reasonable sizes.
By default, the number of documents on the client side is 128 (but you can change that) and 1024 for the...