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

Add best effort detection when index is removed & recreated before openIfChanged

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I dug into the confusing NPE from the java-user email with subject "[lucene 4.6] NPE when calling IndexReader#openIfChanged".

      It happens because the app was opening an IndexReader, then rm -rf the entire index, build a new one, then calling reopen. This is invalid usage (the app should instead use IW.deleteAll, or open new IW with OpenMode.CREATE), but I'd like to add a minor best effort check...

        Attachments

        1. LUCENE-5684.patch
          13 kB
          Michael McCandless
        2. LUCENE-5684.patch
          11 kB
          Michael McCandless

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: