lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karsten Konrad" <Karsten.Kon...@xtramind.com>
Subject AW: BooleanQuery$TooManyClauses
Date Tue, 30 Mar 2004 07:44:11 GMT

Hi,

the final version throws the exception when the query expansion results in more than 1000
tokens; if you get this in range queries over dates, try indexing the dates with a rounded
date format - not based on milliseconds. By this, you effectively reduce the number of tokens
that will be expanded from the date range.

>>
I've noticed the same problem.. The strange thing is that it only 
happens on some queries.  For example the query "blog" results in this 
exception but the query for "linux" in my index works just fine. 
>>

The "blog" does not cause this exception, rather some range that you give.

>>
I'm also using a DateRange but I disabled it still noticed the same behavior.
>>

That would be really strange. Are you absolutely sure?

Regards,

Karsten

-----Ursprüngliche Nachricht-----
Von: Kevin A. Burton [mailto:burton@newsmonster.org] 
Gesendet: Dienstag, 30. März 2004 09:25
An: Lucene Users List
Betreff: Re: BooleanQuery$TooManyClauses


hui wrote:

>Hi,
>I have a range query for the date like [20011201 To 20040201], it works 
>fine for Lucene API 1.3 RC1. When I upgrade to 1.3 final, I got 
>"BooleanQuery$TooManyClauses" exception sometimes no matter the index 
>is created by 1.3RC1 or 1.3 final. Check on the email archive, it seems 
>related with maxClauseCount. Is increasing maxClauseCount the only way 
>to avoid this issue in 1.3 final? The dev mail list has some discussion 
>on the future plan on this.
>  
>
I've noticed the same problem.. The strange thing is that it only 
happens on some queries.  For example the query "blog" results in this 
exception but the query for "linux" in my index works just fine. 

This is the stacktrace if anyone's interested:

org.apache.lucene.search.BooleanQuery$TooManyClauses
        at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:109)
        at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:101)
        at 
org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:99)
        at 
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:240)
        at 
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:240)
        at 
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:188)
        at org.apache.lucene.search.Query.weight(Query.java:120)
        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:128)
        at 
org.apache.lucene.search.MultiSearcher.search(MultiSearcher.java:150)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:93)
        at org.apache.lucene.search.Hits.<init>(Hits.java:80)
        at org.apache.lucene.search.Searcher.search(Searcher.java:71)

For the record I'm also using a DateRange but I disabled it still noticed the same behavior.

Kevin

-- 

Please reply using PGP.

    http://peerfear.org/pubkey.asc    
    
    NewsMonster - http://www.newsmonster.org/
    
Kevin A. Burton, Location - San Francisco, CA, Cell - 415.595.9965
       AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
  IRC - freenode.net #infoanarchy | #p2p-hackers | #newsmonster


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


Mime
View raw message