lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Open-ended range queries
Date Thu, 10 Jun 2004 15:32:59 GMT
On Jun 10, 2004, at 9:38 AM, Eric Jain wrote:
> I see that with RangeQueries either the upperTerm or the lowerTerm are 
> optional - very useful. However, it seems the QueryParser doesn't 
> support this, or is there a syntax trick I have overlooked?

Correct, QueryParser does not support open-ended range queries.  A 
hack, of course, is to use some text that comes ahead of the first or 
beyond the last term on either end of the range.  [term TO ZZZZZ] for 

What would you suggest as a way to denote an open end?

FYI - You could override getRangeQuery on a custom QueryParser subclass 
and implement this yourself.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message