lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dror Matalon <d...@zapatec.com>
Subject Wildcard searches and BooleanQuery$TooManyClauses
Date Tue, 25 Nov 2003 18:23:42 GMT

This was raised in 

http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg04696.html

and not really answered.


If I do 

+(contents:luc* description:luc*)

Things work fine. However if I do 
+(contents:car* description:car*)

I get the following exception


org.apache.lucene.search.BooleanQuery$TooManyClauses
&lt;/pre&gt;
&lt;h4&gt;------------start of original exception stack
trace-------&lt;/h4&gt;
&lt;pre&gt;
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.PrefixQuery.rewrite(PrefixQuery.java:85)
	at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:240)
	at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:189)
	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.Hits.getMoreDocs(Hits.java:93)
	at org.apache.lucene.search.Hits.&amp;lt;init&amp;gt; (Hits.java:80)
	at org.apache.lucene.search.Searcher.search(Searcher.java:71)
	at org.apache.lucene.search.Searcher.search(Searcher.java:65)
	at com.fastbuzz.search.Results.fetchResults(Results.java:134)
	at com.fastbuzz.search.Results.&amp;lt;init&amp;gt; (Results.java:
  ...


My guess is that wild cards are rewriten as a bunch of BooleanQuery(s)
so that car* is actually
car
cars
carma
...

Since I have more than 1024 terms in my index that start with car, I get
this exception. 

What are the performence reprecussions to increasing maxClauseCount from
1024 to something large, say 64K?


Regards,

Dror

-- 
Dror Matalon
Zapatec Inc 
1700 MLK Way
Berkeley, CA 94709
http://www.fastbuzz.com
http://www.zapatec.com

---------------------------------------------------------------------
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