03-07-2016 12:51 PM
Hi,
I'm use Automation Client to connecto to Nuxeo REST API. I use "Document.Query" operation. My client said me that only like 2 Page. The result of search is 2 documents, and pageSize is 5.
I call for first Page with currentPageIndex=1, but when y call to retrieve a second Page with currentPageIndex=2, I obtain the same result.
I think this second time I must obtain a null.
Thanks JMPrieto
03-09-2016 05:38 AM
Hi José Manuel,
I am using the REST API of automation with Document.Query from REST client (ie. Postman) and results are always OK. In fact, the parameters pageIndex and currentPageIndex are working showing the elements and current page with no problems. I think that the problem could be the setup of parameters on the client. Anyway, I recommend to you, check the Document.Query like me, and check the client source code to ensure that params are setting properly.
You can find the source code of Document.Query automation here:
, to ensure the parameters and/or to find any bug from your client.
Hope that helps.
Regards, VS!
03-10-2016 06:21 AM
Thanks Victor,
Your link is broken but help me to find the correct link: https://github.com/nuxeo-archives/nuxeo-features/blob/master/nuxeo-automation/nuxeo-automation-featu...
Nuxeo not has a BUG. If you request a Query with currentPageIndex= 5 and with pageSize= 5, but the query only return two Documents. The response object is a list of Document. But response object is a PaginatedDocument not a Document. (PaginatedDocument extends Document).
PaginatedDocument has the attribute "currentPageIndex", and it says 0, not 5.
Thanks.
03-10-2016 07:38 AM
Hi José Manuel,
03-10-2016 08:00 AM
You are in true, but if I request for Apples why Nuxeo response Flowers. I think response must be an Exception. If you request something that I can't have, my response must be "Sorry, Its impossible to satisfy your request because...". Or not?
03-31-2016 09:48 AM
When doing paging it's quite common to return 0-sized answers. As documents could have been concurrently removed, it's would be quite bad to crash with an exception just because the page you're now on doesn't have any documents left.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.