[
https://issues.apache.org/jira/browse/LUCENE-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610510#action_12610510
]
Michael McCandless commented on LUCENE-1314:
--------------------------------------------
Why would you ever need to make a read-only clone of a writable IndexReader?
In fact, once we have readOnly IndexReaders, why would you ever clone one? The
[precarious] use case that set us down this path (adding clone()) in the first
place was to make a clone so that you could make changes to the clone without
affecting the original reader.
I think clone() should just clone() and not "alter" the readOnly-ness of the
original IndexReader? We could still then under the hood do copy-on-write. We
can just do this ourselves -- keep a boolean isShared in SegmentReader that's
true when more than one SegmentReader is referencing the norms/deletedDocs.
I do think we should make IndexReader.open take a readOnly boolean
(LUCENE-1030). In fact, maybe we should go off do that one, first, since it
may change our approach to clone? (Ie swap the order of these two)?
> IndexReader.reopen(boolean force)
> ---------------------------------
>
> Key: LUCENE-1314
> URL: https://issues.apache.org/jira/browse/LUCENE-1314
> Project: Lucene - Java
> Issue Type: New Feature
> Components: Index
> Affects Versions: 2.3.1
> Reporter: Jason Rutherglen
> Assignee: Michael McCandless
> Priority: Minor
> Attachments: lucene-1314.patch, lucene-1314.patch, lucene-1314.patch,
> lucene-1314.patch, lucene-1314.patch, lucene-1314.patch
>
>
> Based on discussion
> http://www.nabble.com/IndexReader.reopen-issue-td18070256.html. The problem
> is reopen returns the same reader if there are no changes, so if docs are
> deleted from the new reader, they are also reflected in the previous reader
> which is not always desired behavior.
--
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]