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 <[email protected]> wrote: > Hi, > > I did not see method setConstantScoreRewrite method > in RangeQuery class? > > Best regards, Lisheng > > -----Original Message----- > From: Michael McCandless [mailto:[email protected]] > Sent: Wednesday, May 20, 2009 11:10 AM > To: [email protected] > 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 <[email protected]> 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: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
