Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 26970 invoked from network); 19 Mar 2009 01:37:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 01:37:50 -0000 Received: (qmail 21934 invoked by uid 500); 19 Mar 2009 00:35:49 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 21889 invoked by uid 500); 19 Mar 2009 00:35:49 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 21880 invoked by uid 99); 19 Mar 2009 00:35:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 17:35:49 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.221.130] (HELO mail-qy0-f130.google.com) (209.85.221.130) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 00:35:42 +0000 Received: by qyk36 with SMTP id 36so400733qyk.29 for ; Wed, 18 Mar 2009 17:35:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.81.140 with SMTP id x12mr1257547qck.35.1237422920388; Wed, 18 Mar 2009 17:35:20 -0700 (PDT) In-Reply-To: <4211869478EE47A6A7C63C0C1DAAA853@VEGA> References: <967A1ED44CF4406B8AF144B0957BCEBF@VEGA> <58910D29-D986-4759-8982-55EF62A4F463@mikemccandless.com> <9ac0c6aa0903181548jf0bd207me7e7330ca7447a6e@mail.gmail.com> <4211869478EE47A6A7C63C0C1DAAA853@VEGA> Date: Wed, 18 Mar 2009 20:35:20 -0400 Message-ID: <9ac0c6aa0903181735h17775c24p779f5657a9a30be3@mail.gmail.com> Subject: Re: move TrieRange* to core? From: Michael McCandless To: java-dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Uwe Schindler wrote: >> If so... maybe we could extend FieldCache's parser to allow it to >> stop-early? Ie it'd get the TermEnum, iterate through all the full >> precision terms first, asking your parser to convert to long/int, >> and then when your parser sees the very first not-full-precision >> term, it tells FieldCache to stop. >> >> Would that work? > > Yes, good idea! In this case it is really better, that the higher > precision terms come first. The question is how to implement that / > extend the current API. Maybe, to also allow extensibility for LUCENE-1372, we should let a parser optionally just do the whole loop? Ie, you're given an IndexReader & String field, and you return an int[]. We could eg make an AdvancedIntParser abstract class, implementing IntParser, and then getInts would check if the parser you passed in is an instance of AdvancedIntParser, and would just call its getInts method if so. It's a bit ugly, because AdvancedIntParser would have to implement a no-op parseInt. But it should be back compatible. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org