lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Why is BooleanQuery.maxClauseCount static?
Date Sat, 15 Apr 2006 19:23:42 GMT
On Saturday 15 April 2006 18:20, Jeff Rodenburg wrote:
> What was the thinking behind making the BooleanQuery maxClauseCount a
> static?  Or, I guess more to the point, why not an instance setting as well?
> 
> Not trying to point out a flaw, just curious about the original thinking
> behind the setting.  I have a situation where I have a set of BooleanQueries
> that use a high number of clauses, but another set that needs a low number
> of clauses (different indexes searched, and efficiencies dictate the
> high/low clause range.)

The reason is to have simplicity in dealing with the case of a single
BooleanQuery using many terms. This was done to avoid spurious
OutOfMemory problems for queries that happen to expand to a lot
of terms, and for that it works well.

With nested BooleanQuerys it wouldn't even make sence to have an
instance setting, because in that case the maximum number of clauses
should be associated with the top level query only.

Regards,
Paul Elschot.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message