[
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]