You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Mark Woon <mo...@helix.stanford.edu> on 2003/09/12 02:06:31 UTC
Strange exception with wildcard use
Hi all...
I'm getting a BooleanQuery$TooManyClauses exception and I'm not really
sure why. I only get it when I do a wild card search, and even then,
not all the time.
Searching for "ca*" and "pa3*" works just fine, but "pa*" or "pa1*"
fails with:
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.IndexSearcher.rewrite(IndexSearcher.java:195)
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:90)
at org.apache.lucene.search.Hits.(Hits.java:80)
at org.apache.lucene.search.Searcher.search(Searcher.java:71)
at org.apache.lucene.search.Searcher.search(Searcher.java:65)
Does anyone have any idea what might be causing this? I'm using the
QueryParser to build my query for me and the SnowballAnalyzer and and
IndexSearcher with to perform the search. This is with what's currently
in CVS.
Thanks,
-Mark
Re: Strange exception with wildcard use
Posted by Mark Woon <mo...@helix.stanford.edu>.
So I've done some digging, and it looks like I can resolve this problem
by setting the max clause count on BooleanQuery. However, I'm not
really sure what this affects.
Can anyone describe what this property controls? Surely it was set to
1024 for a reason...
Thanks,
-Mark