Re: Syntax for Numeric Range

2011-02-04 Thread Anuj Shah
rom: Anuj Shah [mailto:anujshahw...@gmail.com] > > Sent: Friday, February 04, 2011 2:53 PM > > To: java-user@lucene.apache.org > > Subject: Re: Syntax for Numeric Range > > > > Hi, > > > > I see why the existing syntax cannot be used to automatically generate a

RE: Syntax for Numeric Range

2011-02-04 Thread Uwe Schindler
t: Friday, February 04, 2011 2:53 PM > To: java-user@lucene.apache.org > Subject: Re: Syntax for Numeric Range > > Hi, > > I see why the existing syntax cannot be used to automatically generate a > NumericRange. But, is it possible to extend the QueryParser to include > additiona

Re: Syntax for Numeric Range

2011-02-04 Thread Anuj Shah
Hi, I see why the existing syntax cannot be used to automatically generate a NumericRange. But, is it possible to extend the QueryParser to include additional syntax for a numeric range. e.g. numericfield:[1;10] > The user can be trained to use this syntax for certain fields (i.e those that I kn

RE: Syntax for Numeric Range

2011-02-03 Thread Uwe Schindler
Hi Anuj, You have to subclass QueryParser and override newRangeQuery() to parse yourself. Automatic parsing is impossible, because QueryParser does not know (in contrast to Apache Solr) which fields have which type (Lucene has no field schema). Example how to do this: http://mail-archives.apache