lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: reverse TermsEnum (/trunk)?
Date Mon, 23 Aug 2010 15:03:44 GMT
I don't think there is a way....

The only thing I can think of is to reverse your term comparator (flex
lets you specify a custom term order); then the terms are indexed in
reversed order and your first term is the "last".

You can seek by ord though.  So you could seek backwards by moving the
ord backwards, but, this will be severely inefficient

Mike

On Mon, Aug 23, 2010 at 10:57 AM, Ryan McKinley <ryantxu@gmail.com> wrote:
> Is there anyway to walk the terms in reverse order?
>
> I have a query that need to find the last matching term -- if it could
> start checking from the end, it would avoid a lot of work.
>
> Thanks
> Ryan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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


Mime
View raw message