willholley commented on a change in pull request #158: add docs around 
pagination
URL: 
https://github.com/apache/couchdb-documentation/pull/158#discussion_r133401046
 
 

 ##########
 File path: src/api/database/find.rst
 ##########
 @@ -833,6 +832,18 @@ Example of selective retrieval of fields from matching 
documents:
             "fields": ["Actor_name", "Movie_year", "_id", "_rev"]
         }
 
+Pagination
+==========
+
+Mango queries support pagination via the bookmark field. Each query will
+return a bookmark. A bookmark is a placeholder that CouchDB uses to
+determine where to start the query from. To get the next set of query
+results for a given query, add the bookmark that was received in the previous
+query to your next query. Remember to keep the query selector the same,
+otherwise you will receive unexpected results. This will return the next
+set of results. To paginate backwards use the previous bookmarks to return
+the previous set of results.
 
 Review comment:
   probably worth mentioning that the presence of a bookmark doesn't guarantee 
that there are more results. The only way to test for more results is to fetch 
the next page.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to