Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 64165 invoked from network); 23 Aug 2010 15:04:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 15:04:32 -0000 Received: (qmail 73613 invoked by uid 500); 23 Aug 2010 15:04:30 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 73311 invoked by uid 500); 23 Aug 2010 15:04:29 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 73303 invoked by uid 99); 23 Aug 2010 15:04:29 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 15:04:29 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 15:04:06 +0000 Received: by fxm17 with SMTP id 17so3932098fxm.35 for ; Mon, 23 Aug 2010 08:03:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.210.206 with SMTP id u56mr4670834weo.50.1282575825141; Mon, 23 Aug 2010 08:03:45 -0700 (PDT) Received: by 10.216.9.2 with HTTP; Mon, 23 Aug 2010 08:03:44 -0700 (PDT) In-Reply-To: References: Date: Mon, 23 Aug 2010 11:03:44 -0400 Message-ID: Subject: Re: reverse TermsEnum (/trunk)? From: Michael McCandless To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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 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