chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: Question about Paging - numItems
Date Fri, 19 Aug 2016 10:32:57 GMT
Hi Sascha,

You are right, totalNumItems should stay the same for each page 
(assuming that the data in the repository doesn't change).
Some repositories don't always return a value for totalNumItems, but 
that's OK from the spec point of view.

If the client sets maxItems to 5 the server MUST NOT return more than 5 
hits. It may return fewer hits (because there are no more hits or 
because of any server constraints), but never more.

OpenCMIS doesn't have a TCK test for that, yet. It may be worth adding 
one...


- Florian


> Hi all,
> 
> I am currently struggling with the paging of a query result set.
> 
> Did I understand it correctly that “numItems” should contain the whole
> number of items (if the repository knows about it)?
> 
> So for example a repository only contains 16 documents all from type
> cmis:document and we have a query like:
> “SELECT cmis:name FROM cmis:document ORDER BY cmis:name”
> 
> When we set the page size (maxItems) to 5 and the skipCount to 0 then
> I assume that the server should pass the first 5 results (the first
> page) and set the numItems to 16.
> When we want the second page we set skipCount to 5 (and leave maxItems
> = 5) and still numItems is 16.
> Third page with a skipCount of 10 and still numItems = 16. And so on…
> 
> Is this correct?
> 
> Cause when I do it this way on the server the QueryFrame in the CMIS
> Workbench gives me 11 hits for skipCount = 5 and maxItems = 5 (the
> ItemIterable in the loop just goes through all pages).
> 
> I compared with Alfresco CMIS Demo server. For this the Workbench
> QueryFrame properly only shows up 5 hits for every page but it seems
> the Alfresco Server does set “numItems” to the summed up number of
> items until current page (numItems = 5 for skipCount = 0, numItems =
> 10 for skipCount = 5).
> 
> I strongly assume Alfresco is right here.
> 
> tia
> 
> Cheers
> Sascha
> 
> P. +84 166 456-3331
> shomeier@apollon.de
> 
> turning technology.
> 
> apollon GmbH+Co. KG
> Maximilianstr. 104
> 75172 Pforzheim / Germany
> www.apollon.de
> 
> Geschäftsführer: Eugen Müller (Vors.), Ingrid Müller (stv. Vors.),
> Peter Schellhorn, Norbert Weckerle
> Amtsgericht Mannheim HRA 500441
> PhG: Meyle+Müller Verwaltungs-GmbH HRB 500138
> 
> apollon auf der dmexco Köln 14./15. September 2016
> Halle 6.1 / Stand A-064
> Schnell kostenlose Tickets downloaden – nur vom 18.7. bis 15.8.2016

Mime
View raw message