[
https://issues.apache.org/jira/browse/LUCENE-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920565#action_12920565
]
Earwin Burrfoot commented on LUCENE-2691:
-----------------------------------------
What's up with intentionally twisted APIs?
The method you introduced makes it perfectly fine to open a reader on some
directory, and then try reopening it on IW, and then on another IW. Later
you're going to add a heap of guards on this method, and runtime exceptions if
user does some pointless reopen sequence?
What was wrong with old parameterless reopen() call?
If you've got a reader over Directory, it reopens looking for new segments
there, if you got a reader from IW, it reopens by asking said IW for the
segments.
> Consolidate Near Real Time and Reopen API semantics
> ---------------------------------------------------
>
> Key: LUCENE-2691
> URL: https://issues.apache.org/jira/browse/LUCENE-2691
> Project: Lucene - Java
> Issue Type: Improvement
> Reporter: Grant Ingersoll
> Assignee: Grant Ingersoll
> Priority: Minor
> Fix For: 4.0
>
> Attachments: LUCENE-2691.patch, LUCENE-2691.patch
>
>
> We should consolidate the IndexWriter.getReader and the IndexReader.reopen
> semantics, since most people are already using the IR.reopen() method, we
> should simply add::
> {code}
> IR.reopen(IndexWriter)
> {code}
> Initially, it could just call the IW.getReader(), but it probably should
> switch to just using package private methods for sharing the internals
--
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]