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

CheckIndex.checkIndex throws IndexNotFoundException: no segments* file found in RAMDirectory@

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.2.1
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None
    • Environment:

      OS X, Lucene 5.2.1

    • Lucene Fields:
      New

      Description

      I am testing upgrade from Lucene 4.1 to 5.2.1 and found that behavior of CheckIndex.checkIndex() changed. We used the following to create status for empty dir (we use it for some reporting purpose):

      CheckIndex.Status status = new CheckIndex(new RAMDirectory()).checkIndex();

      At 5.2.1 it throws:

      org.apache.lucene.index.IndexNotFoundException: no segments* file found in RAMDirectory@51f090da lockFactory=org.apache.lucene.store.SingleInstanceLockFactory@8b6023d: files: []
      at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:487)
      at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:466)

      I expect that it should returns status with cantOpenSegments flag on. https://lucene.apache.org/core/5_2_1/core/org/apache/lucene/index/CheckIndex.Status.html#cantOpenSegments

      Is it expected behavior?

      If this isn't expected, I am willing to provide a fix (should be minor) that I could figure out on it how to contribute.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            kuzminva Vladimir Kuzmin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development