lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: move TrieRange* to core?
Date Thu, 19 Mar 2009 00:35:20 GMT
Uwe Schindler <uwe@thetaphi.de> 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


Mime
View raw message