On Wed, Mar 3, 2010 at 11:10 AM, Grant Ingersoll <gsing...@apache.org> wrote:
>
> On Mar 1, 2010, at 2:51 AM, Michael McCandless wrote:
>
>> Yeah in the case of DirectoryReader/MultiReader, I'd like for them to
>> be final, not for performance but for door-shutting (ie the same
>> reason we make analyzers final).
>
> Door shutting often is not a good thing, especially in a project like Lucene 
> where many people extend in ways we can't dream of.

I agree, in general, but in this case, I really think Lucene should
move away from Directory/MultiReader extending IndexReader, so making
them final would help protect future users from going in the "wrong
direction".  Or maybe we should deprecate them (in favor of similar
classes, that hold an ordered collection of sub-readers, but do not
implement IndexReader).

Flex is taking some steps towards this -- for the new APIs,
Directory/MultiReader.fields() throws UOE.

And BTW this is another example where if Solr/Lucene were developed
together, I'd have a better sense of where Solr still relies on the
top-level reader, to help drive this...

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to