lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: Open-ended range queries
Date Thu, 10 Jun 2004 18:13:52 GMT
Actually, QueryParser does support open-ended ranges like :  [term TO null].
Doesn't work for the lower end of the range (though that's usually less of a
problem).

Regards,

Terry

----- Original Message ----- 
From: "Erik Hatcher" <erik@ehatchersolutions.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Thursday, June 10, 2004 11:32 AM
Subject: Re: Open-ended range queries


> 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
> example.
>
> 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.
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


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


Mime
View raw message