There are several different ways to solve this problem: one of them you have already proposed, namely to get pages as needed, to get bookmarks. I am not sure that there are many alternatives for search results where we cannot pre-calculate the results.
Another alternative, and it depends a little on the details of what you are trying to do, is to create a view containing the data and use the keys to narrow the view down to the desired results. Exit browsing supports the use of limit and skip , which will allow you to implement pagination.
There is also a good example of pagination in documents: http://docs.couchdb.org/en/2.1.0/ddocs/views/pagination.html
source share