As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
# Properties to limit resources spent on individual searches # # The maximum time spent pruning results system.acl.maxPermissionCheckTimeMillis=10000 # The maximum number of results to perform permission checks against system.acl.maxPermissionChecks=1000
searchParameters.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS); searchParameters.setLimit(0);
Your problem is most likely not caused by "system.acl.maxPermissionChecks" being set to "1000". You should raise your "system.acl.maxPermissionCheckTimeMillis" to the longest time you could wait for search results. It seems that your first test returned 1000 results in less than 10 seconds and then stopped because "maxPermissionChecks" was hit. Your second test probably stopped after hitting "maxPermissionCheckTimeMillis" without returning results because it didn't have enough time to go past the document visible to the current user.In other words: with default settings Lucene filtering stops after 1000 checks or after 10 seconds (which one comes first). The only real solution to this problem is speeding up permission checks, since getting raw results out of Lucene indexes is already really fast. A temporary workaround for you could be setting a very high "maxPermissionCheckTimeMillis" value (and narrow down your search criteria as much as possible to reduce the raw resultset size).If you are building a custom solution using Alfresco Foundation API and don't mind disabling permission checks on results you may try: searchParameters.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS); searchParameters.setLimit(0); This disables every permission check and returns the whole raw result set.
… ResultSet resultSet = searchService.query(…); … LimitBy limitBy = resultSet.getResultSetMetaData().getLimitedBy(); if (LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS.equals(limitBy)) { /* Search hit lucene configured limits… return the error here. */ … }
Switch to Alfresco 4 and use Solr.