lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David_Birtw...@VWR.COM
Subject Re: Limit on number of required/prohibited clauses
Date Fri, 05 Sep 2003 18:22:26 GMT

Hi Scott/Eugene,

I don't think that the limitation of 32 required/prohibited clauses is
related to the BooleanQuery maxClauseCount.

The default maxClauseCount of Boolean query is set to 1024.  This
restriction is to prevent a wildcard term expansion from creating a query
with thousands of clauses.  The limitation of 32 required/prohibited
clauses is a different limitation and I believe has more to do with the way
queries are processed at a low level.

Eugene, can you group your terms so that you have less than 32
required/prohibited clauses?  For example, instead of a query that is "-red
-blue -yellow -green", you could do "-(red blue yellow green)" and reduce
your required/prohibited clause count from 4 to 1.


                      Scott Ganyo                                                        
                      <scott.ganyo@etap        To:       Lucene Users List <>
            >               cc:                                    
                                               Subject:  Re: Limit on number of required/prohibited
                      09/05/2003 01:55                                                   
                      Please respond to                                                  
                      "Lucene Users                                                      

Hi Eugene,

Yes.  Doug (Cutting) added this to eliminate OutOfMemory errors that
apparently some people were having.  Unfortunately, it causes
backward-compatibility issues if you were used to using version 1.2.
So, you'll need to add a call like this:


(Of course, you can set the parameter to whatever you want, but
unrestricted works best for me.)


Eugene S. wrote:

>I've come across the limit on the number of
>required/prohibited clauses in a boolean query (the
>limit  is 32). What is the reasoning for having such
>limit? Can it be circumvented?
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>To unsubscribe, e-mail:
>For additional commands, e-mail:

All progress is initiated by challenging current conceptions, and executed
by supplanting existing institutions. - George Bernard Shaw

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message