Hi All,
Is there a possible way to get all data using the CMIS Workbench QUERY?
based on my testing I've just get only 100 data instead of 100,000+ data in our production.
How?
Thanks,
Cyrus Nhiel
any ideas?
Simple answer is: NO
Alternatives: https://angelborroy.wordpress.com/2018/05/30/alfresco-counting-more-than-1000-elements/
Angel Borroy Hi borry I've already found a solution for this and I've gather more than 100,000 data from my query. Thanks for the response
And can you share your findings with us?
Angel Borroy Sure, First before entering the WORKBENCH , in the url http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom?maxItems=100000 add the maxItems you want , then in the groovy script
just add
String cql = "SELECT * FROM cmis:document"
OperationContext opCon = session.createOperationContext();
opCon.setLoadSecondaryTypeProperties(true);
opCon.setMaxItemsPerPage(100000);
ItemIterable<QueryResult> results = session.query(cql, false, opCon)
Then u can get the data you want
No more configurations?
This does not work for me.
Angel Borroy in our case there's no configuration and we're using modified db table.
Angel Borroy in our case here's my full code, I've extracted it and download it to csv file
import org.apache.chemistry.opencmis.commons.*
import org.apache.chemistry.opencmis.commons.data.*
import org.apache.chemistry.opencmis.commons.enums.*
import org.apache.chemistry.opencmis.client.api.*
import org.apache.chemistry.opencmis.client.util.*
String cql = "SELECT ap:apXxX FROM ap:apXXX where ap:apxxx <> 'POSTED'"
OperationContext opCon = session.createOperationContext();
opCon.setLoadSecondaryTypeProperties(true);
opCon.setMaxItemsPerPage(100000);
ItemIterable<QueryResult> results = session.query(cql, false, opCon)
File file = new File("C:/xxx/xxx/xxx/xxx/PONum.csv");
for(QueryResult hit: results) {
for(PropertyData<?> property: hit.getProperties()) {
String queryName = property.getQueryName();
Object value = property.getFirstValue();
file.append(value+"\n");
}
}
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.