lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Busch (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-986) Refactor segmentInfos from IndexReader into its subclasses
Date Tue, 18 Sep 2007 19:35:44 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528522
] 

Michael Busch commented on LUCENE-986:
--------------------------------------

> I got the patch to apply cleanly (see mailing list for details) 

Thanks, Hoss! I'm using TortoiseSVN, I have to check how to set those
default properties for new files correctly.

>    * just to clarify: IndexReader(Directory) is only around for
>      backwards compatibility in subclasses right? And the only reason
>      for the "private Directory" is to keep supporting the directory()
>      method for any subclasses relying on it?

Yes, correct.

>    * IndexReader() says it can be removed once the other constructor is
>      removed ... why? is that just pointing out that we can rely on the
>      default constructor?

Yes, just a suggested simplification. Keeping the constructor wouldn't hurt
though.

>    * since one of the goals is that IndexReaders which don't own their
>      directory shouldn't utilize segmentInfos, would it make sense to
>      eliminate directoryOwner from DirectoryIndexReader and instead test
>      whether (null == segmentInfos) ?

Sounds good, will do...

>    * the way TestMultiReader is setup with the "mode" is a bit confusing
>      ... perhaps instead we should make a subclass where only openReader
>      is overwritten (it will inherit the individual test methods) ?

Yes, that's cleaner, will make that change as well.

> here's the list of tweaks I made...

The improvements look good to me.
Thanks for the review, Hoss! I'll attach a new patch shortly.

> Refactor segmentInfos from IndexReader into its subclasses
> ----------------------------------------------------------
>
>                 Key: LUCENE-986
>                 URL: https://issues.apache.org/jira/browse/LUCENE-986
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Michael Busch
>            Assignee: Michael Busch
>            Priority: Minor
>             Fix For: 2.3
>
>         Attachments: lucene-986.patch, lucene-986.patch
>
>
> References to segmentInfos in IndexReader cause different kinds of problems
> for subclasses of IndexReader, like e. g. MultiReader.
> Only subclasses of IndexReader that own the index directory, namely 
> SegmentReader and MultiSegmentReader, should have a SegmentInfos object
> and be able to access it.
> Further information:
> http://www.gossamer-threads.com/lists/lucene/java-dev/51808
> http://www.gossamer-threads.com/lists/lucene/java-user/52460
> A part of the refactoring work was already done in LUCENE-781

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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