Pagination with Dates and refresh
I've read some documentation on pagination for Couchbase. What I would like to do is create a call that grabs the first 100 results based on date, then will grad the next 100 results based on end date of the previous 100. Also equally important is on refresh to get all new entries. So whatever entries are before the first 100 results, up to 100.
Is grouping the only way and/or the most efficient way to sort dates in Couchbase?
Couchbase views are using a key (or compound key) to allow you to query, sort and group (reduce), so you need to emit the date in your view , something like:
So yes it is the proper and best way to do this.
Have you looked at this blog post about pagination: