From 2a21bb036e64ca09f0bd450857248be27f596d12 Mon Sep 17 00:00:00 2001 From: ThamaluM <52935489+ThamaluM@users.noreply.github.com> Date: Sun, 24 Nov 2019 21:10:45 +0530 Subject: [PATCH] Add examples for order Update docs to include examples of ordering and top lists --- doc/server.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/server.rst b/doc/server.rst index 26891012..a8d128a3 100644 --- a/doc/server.rst +++ b/doc/server.rst @@ -448,11 +448,25 @@ Example for request ``/aggregate?drilldown=date&cut=item:a``: If pagination is used, then ``drilldown`` will not contain more than -``pagesize`` cells. +``pagesize`` cells for a page. Pages start from 0 and ``page=0`` gives the first page. Note that not all backengs might implement ``total_cell_count`` or providing this information can be configurable therefore might be disabled (for example for performance reasons). + +Example for ``order`` + +``..aggregate?order=amount`` + +Default is ascending order you can specify ordering method by ``asc`` or ``desc`` as below. + +``..aggregate?order=amount:desc`` + +Pagination and ordering can be collectively used to get top lists. + +For example (Top five amounts) +``..aggregate?order=amount:desc&pagesize=5&page=0`` + Facts