lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Support for NumericRangeQuery in QueryParser
Date Tue, 12 Jun 2012 11:10:53 GMT
Hi Jochen,

the flexible query parser in contrib allows for numeric fields (you need to
configure it to "know" the types of fields, e.g. which fields are long
float,...). Alternatively use the code from my "Java Magazin" article a few
years ago and customize core's QueryParser by overriding the factory method
that creates range queries (I assume you are German and know this IT
magazine).

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Jochen Hebbrecht [mailto:jochenhebbrecht@gmail.com]
> Sent: Tuesday, June 12, 2012 9:30 AM
> To: java-user@lucene.apache.org
> Subject: Support for NumericRangeQuery in QueryParser
> 
> Hi,
> 
> I'm currently reading "Lucene in action (2nd edition)". At page 105 -
section
> 3.5.4, I'm reading the following paragraph:
> 
> ---
> 
> QueryParser won't create a NumericRangeQuery for you. This is because
> Lucene currently doesn't keep track of which of your fields were indexed
with
> NumericField, though it's possible this limitation has been corrected by
the
> time you read this.
> 
> ---
> 
> I'm using version 3.2 of Lucene and I'm not able to "queryparse" a
> NumericRange syntax query. Can somebody tell me if this is already fixed
in
> Lucene? And most of all: in which version :-). I cannot find it using
Google :-( ...
> 
> Thanks!
> 
> Jochen


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


Mime
View raw message