lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Delgado" <joaquin.delg...@gmail.com>
Subject Re: How to do a query using less than or greater than
Date Wed, 25 Jun 2008 03:01:01 GMT
I do not believe that the operators "<" and ">" are supported by
Lucene, but you can use RANGE SEARCH to do achieve what you want. Just
put an unreachable upper boundary for "greater than" or lower boundary
for "less than".

J.D.
On Tue, Jun 24, 2008 at 3:31 PM, Kyle Miller <kyleinva@gmail.com> wrote:
> Hi all,
>   I've been looking at the lucene documentation and the source code
> and I can't seem to find a greater than or less than operator in the
> default query syntax for lucene.  Does anyone one know if they exists
> and how to use them?  For a concrete example I'm looking to do a query
> on a date field to find documents earlier than a specified date or
> later than a specified date.  Ex: date:( >20070101)  or date:
> (<20070101).  I looked at the range query feature but it didn't appear
> to cover this case. Anyone have any suggestions?
> Thanks,
> Kyle

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


Mime
View raw message