lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Delgado" <>
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".

On Tue, Jun 24, 2008 at 3:31 PM, Kyle Miller <> 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:
For additional commands, e-mail:

View raw message