[ 
https://issues.apache.org/jira/browse/LUCENE-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-2634:
---------------------------------------

    Attachment: LUCENE-2634.patch

Nice catch -- thanks Nikolay!

I attached a patch, including tweaked test case (added copyright, removed 
@author, cutover to random) and fix.

In the NRT case we were failing to check whether a commit had occurred since 
the NRT reader was opened.

> IndexReader.isCurrent() lies if documents were only removed by latest commit
> ----------------------------------------------------------------------------
>
>                 Key: LUCENE-2634
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2634
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.3
>         Environment: Ubuntu 9.10
> Sun-java-jdk 1.6.0_20-b02
>            Reporter: Nikolay Zamosenchuk
>            Assignee: Michael McCandless
>         Attachments: LUCENE-2634.patch, TestIsCurrent.java
>
>
> Usecase is as following:
> 1. Get indexReader via indexWriter.
> 2. Delete documents by Term via indexWriter. 
> 3. Commit indexWriter.
> 4. indexReader.isCurrent() returns true.
> Usually there is a check if index reader is current. If not then it is 
> reopened (re-obtained via writer or ect.). But this causes the problem when 
> documents can still be found through the search after deletion.
> Testcase is attached.

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

Reply via email to