-->

Alfresco CMIS limit size and time query

2019-08-09 03:11发布

问题:

we are developing a front end integrated with Alfresco, we are using CMIS protocol to execute queries against different istances of Alfresco, but we would like to set a limit to a maximum time and a maximum results that a query could give. Is this achievable with CMIS standard, or is only manageable with acl permissions in alfresco.global.properties (blocking lucene)? We would like not to touch these settings in Alfresco. Thanks

回答1:

If you are using the AtomPub binding via HTTP directly and you are using HTTP GET, then you can add the the URL parameter maxItems to the query URL.

If you are using HTTP POST for the query, you have to add the maxItems parameters to the payload. See: http://docs.oasis-open.org/cmis/CMIS/v1.0/cs01/cmis-spec-v1.0.html#_Toc243905541



回答2:

The CMIS specification makes no provision for limiting the maximum time it takes to return a query result. Neither does the OpenCMIS library, that I know of.

However, you can limit the number of search results that come back by setting maxItems. If you are using OpenCMIS you can do this by passing in an OperationContext on which you've called the setMaxItemsPerPage method.



回答3:

You only have to change a couple of configuration parameters in file repository.properties which is located in Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco. This parameters are:

system.acl.maxPermissionChecks system.readpermissions.bulkfetchsize

You could set them to the value you want. Default values are set to 1000.



标签: alfresco cmis