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

isCurrent() and getVersion() on an NRT reader are broken

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 2.9.1, 3.0, 4.0-ALPHA
    • core/index
    • None
    • New

    Description

      Right now isCurrent() will always return true for an NRT reader and getVersion() will always return the version of the last commit. This is because the NRT reader holds the live segmentInfos.

      I think isCurrent() should return "false" when any further changes have occurred with the writer, else true. This is actually fairly easy to determine, since the writer tracks how many docs & deletions are buffered in RAM and these counters only increase with each change.

      getVersion should return the version as of when the reader was created.

      Attachments

        1. LUCENE-1976.patch
          9 kB
          Michael McCandless

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: