cancel
Showing results for 
Search instead for 
Did you mean: 

Paging in NXQL

SMAH_Haider
Star Contributor
Star Contributor

We have Nuxeo EP 5.5 deployed at one of our server. Our application that is deployed on another computer using Nuxeo webservices to search document against a search criteria. Now there may be 10,000 records against this search criteria because we are incorporating Nuxeo EP 5.5 with our enterprise application.

As we are using nuxeo webservices to interact with Nuxeo so we'll have to slice this huge response as we are displaying the result at our front end (application) page by page (10 rows per page.)

Nuxeo does provide:

DocumentModelList docs = session.query("SELECT * FROM DOCUMENT WHERE dc:title = '"+aTitle+"'").subList(fromIndex, toIndex);

to break the result to chunks.

I want to know does NXQL provide any paging support? I want to do this at query level to further speedup the response.

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

There are various different signatures for CoreSession.query(), some of which like this take limit/offset values. Make sure that you ORDER BY in your query to get consistent results, for instance ORDER BY ecm:uuid.

View answer in original post

4 REPLIES 4

SMAH_Haider
Star Contributor
Star Contributor

some clause in NXQL?

Florent_Guillau
World-Class Innovator
World-Class Innovator

There are various different signatures for CoreSession.query(), some of which like this take limit/offset values. Make sure that you ORDER BY in your query to get consistent results, for instance ORDER BY ecm:uuid.

Also you may want to consider using CoreSession.queryAndFetch for more efficient returning of lots of values if you're not directly interested in the DocumentModel itself.

Perfect! exactly what I wanted. Thanks Florent.

Getting started

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.