lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: BooleanQuery - TooManyClauses
Date Tue, 26 Oct 2004 12:37:45 GMT

On Oct 25, 2004, at 6:35 PM, Angelov, Rossen wrote:
> Why there is a limit on the number of clauses? and is there any harm in
> setting MaxClauseCount to Integer.MAX_VALUE?

The harm is in performance and resource utilization.  Rather than do 
this, though, read on...

> I'm using a Range Query on a field that represents dates and getting
> BooleanQuery$TooManyClauses exception.
> This is the query -  +/article/createddateiso8601:[20030101000000 TO
> 20031231999999]

Do you really need to do ranges down to that time level?  Or are you 
really just concerned with date?  If you indexed using YYYYMMDD 
instead, there would only be a maximum of 365 terms in that range, 
whereas you've got zillions (ok, I was too lazy to do the math!  But 
far more than 1,024).

I recommend changing how you index dates, or at least use a different 
field for queries that do not need to concern themselves with the 
timestamp aspect.


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

View raw message