cancel
Showing results for 
Search instead for 
Did you mean: 

How to fetch 70,000 records?

umajava
Champ in-the-making
Champ in-the-making
I am trying to fire a CMIS query that should get me 70,000 records but I can only get 1000 records. I understand that updating below config can help me upto some extent but is there any other alternative to this? I dont have permissions to update these settings.

system.acl.maxPermissionCheckTimeMillis=100000
system.acl.maxPermissionChecks=10000

My code is as below


String cql = "select cs.cmis:objectId, cs.wm:Title from wm:reports cs join wm:common_metadata as cmd on cs.cmis:objectId = cmd.cmis:objectId where cmd.wm:Date='2006'"
           
        ItemIterable<QueryResult> results = session.query(cql, false).getPage(10000);   
       
        for (QueryResult qResult : results) {       
            String objId = qResult.getPropertyValueByQueryName("cs.cmis:objectId")
            String Title = qResult.getPropertyValueByQueryName("cs.wm:Title")
            log.info(objId+"——"+Title)
        }   


Thanks,
1 REPLY 1

thijslemmens
Champ in-the-making
Champ in-the-making
Hi Umajava

What version of Alfresco are you using? From 4 onward permission checking should be done in the indexes, and you should not encounter this issue.

As a workaround you could (if you have the rights) add a temporary aspect to the search results and search for documents without it. Afterwards you need to do a cleanup.

kind regards

Thijs Lemmens