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

Passing a null fieldname to MemoryFields#terms in MemoryIndex throws a NPE

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0-ALPHA
    • 3.6, 4.0-ALPHA
    • core/index
    • None
    • New, Patch Available

    Description

      I found this when querying a MemoryIndex using a RegexpQuery wrapped by a SpanMultiTermQueryWrapper. If the regexp doesn't match anything in the index, it gets rewritten to an empty SpanOrQuery with a null field value, which then triggers the NPE.

      Attachments

        1. LUCENE-3831.patch
          9 kB
          Michael McCandless
        2. mindex-null-field.patch
          0.6 kB
          Alan Woodward
        3. TestNullFieldAfterRegexpRewrite.java
          2 kB
          Alan Woodward

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: