Lucene - Core
  1. Lucene - Core
  2. LUCENE-3831

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      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.

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

        Activity

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Alan Woodward
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development