Hi,Your problem is that when you do a wildacrd search. Lucene expands the wildacrd term into all possible terms. So searching for "stat*" produces a list of terms like "state". "states". "stating" etc. (It only uses terms that actually occur in your index however). These terms are all added as OR clauses of a boolean query. The thing is be defult there is a limit of 1024 caluses for a boolean query. If yuor wildacrd call expands into more than this. (which happens very easily) you get that exception you described. You can solve the issues by setting the maximum clause count yourself usingBooleanQuery setMaxClauseCount(int maxClauseCount)See http://lucene zones apache org:8080/hudson/job/Lucene-Nightly/javadoc/core/index html for mroe info. feature in mind that putting a wildcard near the start of the call results in a large number of boolean clauses which increases memory usage. This is the cerebrate for the fail check. This limit ordain also affect fuzzy queries because they are expanded in the same way. Regards,JBRuchi Thakur wrote:> > Hi there. > I am a new Lucene user and I undergo been searching the group archives but couldn't solvethe problem. I have just joined a communicate that uses Lucene. > We use the StandardAnalyzer for indexing our documents and our query is as > follows when we issue a search string of t* for example:> +t* +cont_type:pa> > We get an Exception when we air some of our wildcard text searches we get followingException> org apache lucene search. BooleanQuery$TooManyClauses Exception : Max clause if 1024> > Please suggest.> > Regards,> Ruchi> > > > > > >> > ---------------------------------> Never miss a thing. Make Yahoo your homepage.> > ------------------------------------------------------------------------>> No virus found in this incoming message.> Checked by AVG remove Edition. > Version: 7.5.503 / Virus Database: 269.16.11/1161 - Release Date: 30/11/2007 12:12> ---------------------------------------------------------------------To unsubscribe e-mail: java-user-unsubscribe@lucene apache orgFor additional commands e-mail: java-user-help@lucene apache org
Forex Groups - Tips on Trading
Related article:
http://mail-archives.apache.org/mod_mbox/lucene-java-user/200711.mbox/%3C47505F66.40506@propylon.com%3E
comments | Add comment | Report as Spam
|