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 "Murdoch, Paul" <PA...@saic.com> on 2010/04/16 20:10:30 UTC

NumericRangeQuery in BooleanQuery

Hi,

 

Can a NumericRangeQuery be one of several Queries inside a complex
BooleanQuery?  When I do this my NumericRangeQuery seems to
automagically be converted to a TermRangeQuery.

 

Thanks,

 

Paul

 

 


RE: NumericRangeQuery in BooleanQuery

Posted by "Murdoch, Paul" <PA...@saic.com>.
Yes and no.  I extended the QueryParser and overrode the getRangeQuery method to let it build NRQ.  When parsing a BooleanQuery containing NRQ using the extended QueryParser the overridden getRangeQuery was never being called.  I think it was still using the QueryParser's.  In the end I'm building my queries in code directly.  That's working for me so far.

Thanks,

Paul 

-----Original Message-----
From: java-user-return-45833-PAUL.B.MURDOCH=saic.com@lucene.apache.org [mailto:java-user-return-45833-PAUL.B.MURDOCH=saic.com@lucene.apache.org] On Behalf Of Uwe Schindler
Sent: Friday, April 16, 2010 6:09 PM
To: java-user@lucene.apache.org
Subject: RE: NumericRangeQuery in BooleanQuery

Thats not true, do you build the NumericRangeQuery in code, or do you use QueryParser. The latter is not able to produce NRQ without customizing!

Else numeric RangeQueries are no magically converted they stay and are rewritten to CustomSCoreQueries.
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Murdoch, Paul [mailto:PAUL.B.MURDOCH@saic.com]
> Sent: Friday, April 16, 2010 8:11 PM
> To: java-user@lucene.apache.org
> Subject: NumericRangeQuery in BooleanQuery
> 
> Hi,
> 
> 
> 
> Can a NumericRangeQuery be one of several Queries inside a complex
> BooleanQuery?  When I do this my NumericRangeQuery seems to
> automagically be converted to a TermRangeQuery.
> 
> 
> 
> Thanks,
> 
> 
> 
> Paul
> 
> 
> 
> 



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


RE: NumericRangeQuery in BooleanQuery

Posted by Uwe Schindler <uw...@thetaphi.de>.
Thats not true, do you build the NumericRangeQuery in code, or do you use QueryParser. The latter is not able to produce NRQ without customizing!

Else numeric RangeQueries are no magically converted they stay and are rewritten to CustomSCoreQueries.
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Murdoch, Paul [mailto:PAUL.B.MURDOCH@saic.com]
> Sent: Friday, April 16, 2010 8:11 PM
> To: java-user@lucene.apache.org
> Subject: NumericRangeQuery in BooleanQuery
> 
> Hi,
> 
> 
> 
> Can a NumericRangeQuery be one of several Queries inside a complex
> BooleanQuery?  When I do this my NumericRangeQuery seems to
> automagically be converted to a TermRangeQuery.
> 
> 
> 
> Thanks,
> 
> 
> 
> Paul
> 
> 
> 
> 



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