cancel
Showing results for 
Search instead for 
Did you mean: 

Another lucene 1000 problem

mangar
Star Contributor
Star Contributor
As we all know, 1000 is the default limit for returns from a lucene query. I am trying to get more. I have tried all the things suggested in these forums such as:


lucene.query.maxClauses=10000
#
# Properties to limit resources spent on individual searches
#
# The maximum time spent pruning results
system.acl.maxPermissionCheckTimeMillis=1000000
# The maximum number of results to perform permission checks against
system.acl.maxPermissionChecks=10000

and the fetch size:

int batchSize=10000;
QueryConfiguration cfg = new QueryConfiguration();
cfg.setFetchSize(batchSize);
repositoryService = WebServiceFactory.getRepositoryService();
repositoryService.setHeader(new RepositoryServiceLocator().getServiceName().getNamespaceURI(),"QueryHeader",cfg);

I still only get 1000 nodes back.

are there any other possibilities that I might try?

and yes, I have more than 1000 documents! Smiley Happy
5 REPLIES 5

mangar
Star Contributor
Star Contributor
*bump*  – Anyone?  Please Help!

frank_d
Champ in-the-making
Champ in-the-making
Any chance you have a web-client-config.xml file which limits the size of the result set, like so:

<search-max-results>1000</search-max-results>

?

If so, can you try to override that setting programmatically?

SearchParameters sp = new SearchParameters();
sp.setLimitBy(LimitBy.UNLIMITED);

and maybe also…

sp.setLimit(-1);

?

mangar
Star Contributor
Star Contributor
Tried all that.  This is becoming a huge problem as I will soon need to update some properties in over 1000 files..

Please Help!

moshquit
Champ in-the-making
Champ in-the-making
Hi,

I've observed the same problem, but if I search using this lucene query:

+(PATH:"/app:company_home/st:sites/cm:Secretaria/cm:Circulares/cm:salida//*")
it returns 6.046 nodes and, incredibly if i search using this, only returns 1000!!!:

+(PATH:"/app:company_home/st:sites/cm:Secretaria/cm:Circulares/cm:salida//*") +(TYPE:"{http://www.alfresco.org/model/content/1.0}content")

Only as a "characteristic" of this problem…

mangar
Star Contributor
Star Contributor
I have duplicated this "Feature"   Smiley Very Happy

It seems that when "TYPE" is added to the lucene query, the 1000 limit applies. 

Is there a magic global variable that needs to be set for this?