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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.9, 6.0
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: