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 Joel Halbert <jo...@su3analytics.com> on 2009/05/20 19:00:59 UTC

RangeQuery & TooManyClausesException : Lucene 2.4

Hi,

Looking at the docs for the 2.4 codebase, for RangeQuery
http://lucene.apache.org/java/2_4_0/api/index.html?org/apache/lucene/search/RangeQuery.html

there is a comment that a TooManyClauses exception is no longer thrown.

Does this mean that it is now safe to use RangeQuery without worrying
about excessive term expansion? Has the implementation changed such that
it is no longer constructing multiple BooleanQuery terms to perform a
range query?

Thx,
Joel


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: RangeQuery & TooManyClausesException : Lucene 2.4

Posted by Michael McCandless <lu...@mikemccandless.com>.
Woops -- disregard my comments.  I was looking at the unreleased
(2.9-dev) version of RangeQuery.

In 2.4, RangeQuery will throw TooManyClauses, if the number of terms
in the range exceeds BooleanQuery's maxClauseCount.
ConstantScoreRangeQuery will not throw that exception.

Mike

On Wed, May 20, 2009 at 2:28 PM, Zhang, Lisheng
<Li...@broadvision.com> wrote:
> Hi,
>
> I did not see method setConstantScoreRewrite method
> in RangeQuery class?
>
> Best regards, Lisheng
>
> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Wednesday, May 20, 2009 11:10 AM
> To: java-user@lucene.apache.org
> Subject: Re: RangeQuery & TooManyClausesException : Lucene 2.4
>
>
> Hmm... that's actually not true: RangeQuery will still throw that
> exception, unless you call setConstantScoreRewrite to true (at which
> point it does the same thing as ConstantScoreRangeQuery, ie that
> exception will not be thrown).
>
> The javadoc for RangeQuery is very misleading.  (This happened when we
> absorbed ConstantScoreRangeQuery into RangeQuery, for 2.4).
>
> I'll fix RangeQuery's javadoc.
>
> Mike
>
> On Wed, May 20, 2009 at 1:00 PM, Joel Halbert <jo...@su3analytics.com> wrote:
>> Hi,
>>
>> Looking at the docs for the 2.4 codebase, for RangeQuery
>> http://lucene.apache.org/java/2_4_0/api/index.html?org/apache/lucene/search/RangeQuery.html
>>
>> there is a comment that a TooManyClauses exception is no longer thrown.
>>
>> Does this mean that it is now safe to use RangeQuery without worrying
>> about excessive term expansion? Has the implementation changed such that
>> it is no longer constructing multiple BooleanQuery terms to perform a
>> range query?
>>
>> Thx,
>> Joel
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: RangeQuery & TooManyClausesException : Lucene 2.4

Posted by "Zhang, Lisheng" <Li...@BroadVision.com>.
Hi,

I did not see method setConstantScoreRewrite method
in RangeQuery class?

Best regards, Lisheng

-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com]
Sent: Wednesday, May 20, 2009 11:10 AM
To: java-user@lucene.apache.org
Subject: Re: RangeQuery & TooManyClausesException : Lucene 2.4


Hmm... that's actually not true: RangeQuery will still throw that
exception, unless you call setConstantScoreRewrite to true (at which
point it does the same thing as ConstantScoreRangeQuery, ie that
exception will not be thrown).

The javadoc for RangeQuery is very misleading.  (This happened when we
absorbed ConstantScoreRangeQuery into RangeQuery, for 2.4).

I'll fix RangeQuery's javadoc.

Mike

On Wed, May 20, 2009 at 1:00 PM, Joel Halbert <jo...@su3analytics.com> wrote:
> Hi,
>
> Looking at the docs for the 2.4 codebase, for RangeQuery
> http://lucene.apache.org/java/2_4_0/api/index.html?org/apache/lucene/search/RangeQuery.html
>
> there is a comment that a TooManyClauses exception is no longer thrown.
>
> Does this mean that it is now safe to use RangeQuery without worrying
> about excessive term expansion? Has the implementation changed such that
> it is no longer constructing multiple BooleanQuery terms to perform a
> range query?
>
> Thx,
> Joel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: RangeQuery & TooManyClausesException : Lucene 2.4

Posted by Michael McCandless <lu...@mikemccandless.com>.
Hmm... that's actually not true: RangeQuery will still throw that
exception, unless you call setConstantScoreRewrite to true (at which
point it does the same thing as ConstantScoreRangeQuery, ie that
exception will not be thrown).

The javadoc for RangeQuery is very misleading.  (This happened when we
absorbed ConstantScoreRangeQuery into RangeQuery, for 2.4).

I'll fix RangeQuery's javadoc.

Mike

On Wed, May 20, 2009 at 1:00 PM, Joel Halbert <jo...@su3analytics.com> wrote:
> Hi,
>
> Looking at the docs for the 2.4 codebase, for RangeQuery
> http://lucene.apache.org/java/2_4_0/api/index.html?org/apache/lucene/search/RangeQuery.html
>
> there is a comment that a TooManyClauses exception is no longer thrown.
>
> Does this mean that it is now safe to use RangeQuery without worrying
> about excessive term expansion? Has the implementation changed such that
> it is no longer constructing multiple BooleanQuery terms to perform a
> range query?
>
> Thx,
> Joel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org