[DocumentDB] Allow Paging (skip/take)
Allowing paging would be huge. Btw, Thank You for rolling out this feature at all! It looks wonderful! Can't wait to try it! However, I won't be able to use it for actual work projects until it supports paging and sorting.
Reopening this user voice item as our support for Skip/Take (Offset/Limit) was only limited to single partition queries.
The newly released .NET SDK v3 now includes support for x-partition queries using Offset/Limit. You can learn more about v3 SDK and try it and provide feedback on our github repo here.
We will also be back-porting this functionality to our .NET v2 SDK. This work will begin shortly and we anticipate it to be released in September.
Once that is released we will mark this feature as complete.
Thank you for your patience and votes.
Dervanil Junior commented
When this feature will be available?
Any update on how to do paging on the DocumentsDB, i have a a collection where i am storing all the request thats happening on my website. I am displaying these request on another page but there is no way i can only get 10 items at one time from the DocumentsDB.
Mark Nickeson commented
Try using FeedOptions.MaxItemCount.
This would be super helpful when driving a UI straight from DocumentDB. The primary rule of scaling any UI to handle millions of records is to implement paging everywhere. Please don't implement it with continuation tokens the way Azure Table Storage did. That's very hard to consume in a UI. You have to store the previous token in a session (which is not scalable) so the user can navigate backwards. Plus, there's no way to tell the user how many pages there are total.
An implementation more akin to SQL's skip/take/limit would be much more usable. Also, pagination is not very useful unless it can also be ordered by some criteria. Therefore, please remember to include an "order by" clause that can be used in conjunction with the skip/take/limit clause.
This is needed for paging scenarios. This would be much more powerful if we had "order by" and "skip" commands to use in conjunction with a "limit" command.
I want this feature as well
Luis Delgado commented
implement the capability to limit the results that come back from the Azure DocumentDB collection, for example, 'LIMIT 1000' will return only the first 1000 rows the meet the query filter.