You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/09/21 13:43:25 UTC

[GitHub] [couchdb-documentation] iilyak commented on a change in pull request #550: Document pagination API

iilyak commented on a change in pull request #550:
URL: https://github.com/apache/couchdb-documentation/pull/550#discussion_r492055003



##########
File path: src/api/ddoc/views.rst
##########
@@ -914,3 +917,45 @@ Sending multiple queries to a view
             }
         ]
     }
+
+.. _api/ddoc/view/pagination:
+
+Pagination
+==========
+
+.. versionadded:: 4.0
+
+There is a support for token based pagination. The token based pagination is an
+alternative to previously recomended :ref:`pagination recipe <views/pagination>`
+based on ``offset``, ``limit`` and ``skip``.
+
+The user can request paginated mode by setting ``page_size`` query parameter. When
+pagination is enabled the response would include ``next`` and ``previous`` tokens.
+Which can be used to retrieve next and previous page of the results.
+The maximum possible page size is configured via ``request_limits``
+section in one of the ``ini`` files.
+
+.. code-block:: ini
+
+    [request_limits]
+    _all_docs = 5000
+    _all_docs/queries = 5000
+    _all_dbs = 5000
+    _view = 2500
+    _view/queries = 2500
+
+
+Note that ``page_size`` for :ref:`Multiple queries <api/ddoc/view/multiple_queries>`
+endpoints limits number of queries the user can submit in the body of the request.

Review comment:
       >  Is it a 1:1 relationship? (i.e. page_size=2 means 2 queries?)
   
   yes




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org