lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: how to deal with too many clause error in boolean query.
Date Thu, 18 Jun 2009 09:43:00 GMT
On Wed, Jun 17, 2009 at 3:32 PM, Tim Williams<> wrote:
> On Wed, Jun 17, 2009 at 3:16 PM, vanshi<> 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:

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message