On Wed, Jun 17, 2009 at 3:32 PM, Tim Williams<william...@gmail.com> wrote: > On Wed, Jun 17, 2009 at 3:16 PM, vanshi<nilu.tha...@gmail.com> wrote: >> >> Hello all, >> >> I have a situation where a field is indexed like this >> (FAC_NAME(Field.Store.NO, Field.Index.NO_NORMS)) and keyword analyzer is >> used on this field. Although, I'm aware that NO_NORMS doesn't use any >> analyzer. >> >> Now, the query +(FAC_NAME:fa*) is failing with 'Too many clause exception' >> in my application. I tried to query the index directly through 'Luke; and it >> is coming up with same exception. If I change the query to have three >> letters like +(FAC_NAME:fai*) then it is returning results. >> >> What could be the cause of errror? Is it due to 'NO_NORMS' field?? > > Wildcards work by term expansion see: > > http://markmail.org/message/s6ruhvpnxhemu3ms
And so if you expand to too many clauses, you'll hit that exception. In 2.9 (trunk, not yet released) WildcardQuery has a setConstantScoreRewrite method, which if you set to true will internally rewrite to a filter instead of expanding to a many-Term'd BooleanQuery. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org