You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Grant Ingersoll (JIRA)" <ji...@apache.org> on 2010/10/13 17:06:32 UTC
[jira] Issue Comment Edited: (LUCENE-2691) Consolidate Near Real
Time and Reopen API semantics
[ https://issues.apache.org/jira/browse/LUCENE-2691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920593#action_12920593 ]
Grant Ingersoll edited comment on LUCENE-2691 at 10/13/10 11:04 AM:
--------------------------------------------------------------------
Again, how is that any different? You are getting back a new Reader and assigning it to the same variable name.
{code}
Directory d = Directory.open("/path/to/somewhere"); // Nice
IndexReader r = IndexReader.open(d); // Nice
Directory d2 = new RAMDirectory(); // Okay
IndexWriter w = new IndexWriter(d2); // Sure
r = w.getReader() // WTF Indeed!
{code}
was (Author: gsingers):
Again, how is that any different? You are getting back a new Reader and assigning it to the same variable name.
{code}
Directory d = Directory.open("/path/to/somewhere"); // Nice
IndexReader r = IndexReader.open(d); // Nice
Directory d2 = new RAMDirectory(); // Okay
IndexWriter w = new IndexWriter(d2); // Sure
r = writer.getReader() // WTF Indeed!
{code}
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org