lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1314) IndexReader.reopen(boolean force)
Date Mon, 15 Sep 2008 14:49:46 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631041#action_12631041
] 

Michael McCandless commented on LUCENE-1314:
--------------------------------------------


Jason I'd like to bring closure on this one; I think it's a good
addition.

But the fact that this patch implies it's possible to clone an
IndexReader that has pending changes makes me nervous.

So, could you change the patch to not include the
"allowCloneWithChanges" addition to IndexReader?  And, instead factor
out the current logic in DirectoryIndexReader.reopen that skips
checking when there are pending changes or isCurrent() returns true
into a new method "allowReopen()"?  This way you can subclass and put
Ocean's logic (allowing a reader with pending changes to be cloned)
into allowReopen().

This way Lucene itself does not allow cloning a reader that has
changes.  But subclasses (Ocean) can still do so.


> 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, 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message