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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment