cancel
Showing results for 
Search instead for 
Did you mean: 

Number of results from a search query not correct

hbf
Champ on-the-rise
Champ on-the-rise
Dear list,

It seems that Lucene searches do not necessarily return all results but only the first few. How can I obtain all nodes that match a certain condition?

In my particular application, I am running a JavaScript server-side script containing

var nodes = search.luceneSearch('ASPECT:"{blabla}foo"');
logger.log("Found " + nodes.length + " nodes.");

Strangely, the same query returns different results:

Found 349 nodes.
Found 412 nodes.

What could be the reason for this?

Many thanks,
Kaspar

P.S. I am using r1262 SVN Alfresco.
4 REPLIES 4

andy
Champ on-the-rise
Champ on-the-rise
Hi

There are two limits, the maximum number of results and the max amount of time spent getting the results/checking permissions. The max time is set in the config (see repository.properties) - the max size is set on the Java API (and probably set to something like 1000 in java script)

Andy

hbf
Champ on-the-rise
Champ on-the-rise
Dear Andy,

Thanks for your reply.

This calms my heart 😉

Kaspar

hbf
Champ on-the-rise
Champ on-the-rise
Regarding the setting in repository.properties that sets the maximal time spent in queries: where is this documented?

I could not find it on the wiki.

Thanks,
Kaspar

kevinr
Star Contributor
Star Contributor
This section in repository.properties:

#
# 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

Kevin