lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Turning IndexReader.isDeleted implementations to final
Date Wed, 03 Mar 2010 16:31:23 GMT
On Wed, Mar 3, 2010 at 11:10 AM, Grant Ingersoll <gsingers@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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message