Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2634

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.9.3
    • 2.9.4, 3.0.3, 3.1, 4.0-ALPHA
    • None
    • None
    • Ubuntu 9.10
      Sun-java-jdk 1.6.0_20-b02

    • 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.

      Attachments

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

        Activity

          People

            mikemccand Michael McCandless
            nzamosenchuk Nikolay Zamosenchuk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: