Lucene - Core
  1. Lucene - Core
  2. LUCENE-1986

NPE in NearSpansUnordered from PayloadNearQuery

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9.1, 3.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The following query causes a NPE in NearSpansUnordered, and is reproducible with the the attached unit test. The failure occurs on the last document scored.

      1. LUCENE-1986.patch
        15 kB
        Michael McCandless
      2. LUCENE-1986.patch
        0.5 kB
        Mark Miller
      3. TestPayloadNearQuery1.java
        6 kB
        Peter Keegan

        Activity

        Hide
        Peter Keegan added a comment -

        Unit test that causes NPE

        Show
        Peter Keegan added a comment - Unit test that causes NPE
        Hide
        Michael McCandless added a comment -

        Thanks for the test case Peter and for the fix Mark!

        I attached a patch that merges the test case into the existing TestPayloadNearQuery, merges in Mark's fix, fixes the whitespace in that test, and adds a CHANGES entry. I'll commit shortly & back port.

        Show
        Michael McCandless added a comment - Thanks for the test case Peter and for the fix Mark! I attached a patch that merges the test case into the existing TestPayloadNearQuery, merges in Mark's fix, fixes the whitespace in that test, and adds a CHANGES entry. I'll commit shortly & back port.
        Hide
        Michael McCandless added a comment -

        Thanks Peter and Mark!

        Show
        Michael McCandless added a comment - Thanks Peter and Mark!
        Hide
        Peter Keegan added a comment -

        + if (!more)

        { + return false; + }

        I was about to submit this same patch today, but I see you beat me to it Thanks Mark.

        Show
        Peter Keegan added a comment - + if (!more) { + return false; + } I was about to submit this same patch today, but I see you beat me to it Thanks Mark.
        Hide
        Michael McCandless added a comment -

        Bulk close all 2.9.1 issues.

        Show
        Michael McCandless added a comment - Bulk close all 2.9.1 issues.

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Peter Keegan
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development