cancel
Showing results for 
Search instead for 
Did you mean: 

luceneSearch with max hits

dnicklas
Champ in-the-making
Champ in-the-making
Hi,

Does any one played arround with the luceneSearch function and the max hits parameter?

When I do:
  var gens = search.luceneSearch("TYPE:\"{http://www.alfresco.org/model/content/1.0}person\'','',false,10000);
  //public org.mozilla.javascript.Scriptable luceneSearch(java.lang.String search,
  //                                                    java.lang.String sortColumn,
  //                                                    boolean asc,
  //                                                    int max)
I only get 1000 hits even if it must be much more.

Thanks
Denis
4 REPLIES 4

patil
Champ on-the-rise
Champ on-the-rise
Hi,

This behaviour is because of below setting.
#
# The maximum number of clauses that are allowed in a lucene query
#
lucene.query.maxClauses=10000

Increase this number to get more results. But take care of the performance of the system as well.


Thanks,
Patil
Cignex Technologies
Bangalore

dnicklas
Champ in-the-making
Champ in-the-making
Tanks,

please help an newbee in which file the parameter must be changed

Many thanks
Denis

dnicklas
Champ in-the-making
Champ in-the-making
… found it.
Here is a link to the documentation:
http://wiki.alfresco.com/wiki/Full-Text_Search_Configuration

and here another interesting thread about this problem:
http://forums.alfresco.com/en/viewtopic.php?f=4&t=34639#p100384

Denis

dnicklas
Champ in-the-making
Champ in-the-making
… as i looked in the file. I saw that i was allready set to 10000.
Any other ideas?

Denis