Lucene - Core
  1. Lucene - Core
  2. LUCENE-2634

IndexReader.isCurrent() lies if documents were only removed by latest commit

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.3
    • Fix Version/s: 2.9.4, 3.0.3, 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 9.10
      Sun-java-jdk 1.6.0_20-b02

    • Lucene Fields:
      New

      Description

      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.

      1. TestIsCurrent.java
        3 kB
        Nikolay Zamosenchuk
      2. LUCENE-2634.patch
        6 kB
        Michael McCandless

        Activity

        Nikolay Zamosenchuk created issue -
        Nikolay Zamosenchuk made changes -
        Field Original Value New Value
        Attachment TestIsCurrent.java [ 12454081 ]
        Michael McCandless made changes -
        Assignee Michael McCandless [ mikemccand ]
        Michael McCandless made changes -
        Attachment LUCENE-2634.patch [ 12454092 ]
        Michael McCandless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.9.4 [ 12315148 ]
        Fix Version/s 3.0.3 [ 12315147 ]
        Fix Version/s 3.1 [ 12314822 ]
        Fix Version/s 4.0 [ 12314025 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12519946 ] Default workflow, editable Closed status [ 12563671 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563671 ] jira [ 12585238 ]

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Nikolay Zamosenchuk
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development