Lucene - Core
  1. Lucene - Core
  2. LUCENE-951

PATCH MultiLevelSkipListReader NullPointerException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      When Reconstructing Document Using Luke Tool, received NullPointerException.

      java.lang.NullPointerException
      at org.apache.lucene.index.MultiLevelSkipListReader.loadSkipLevels(MultiLevelSkipListReader.java:188)
      at org.apache.lucene.index.MultiLevelSkipListReader.skipTo(MultiLevelSkipListReader.java:97)
      at org.apache.lucene.index.SegmentTermDocs.skipTo(SegmentTermDocs.java:164)
      at org.getopt.luke.Luke$2.run(Unknown Source)

      Luke version 0.7.1

      I emailed with Luke author Andrzej Bialecki and he suggested the attached patch file which fixed the problem.

      1. MultiLevelSkipListReader.patch
        0.5 kB
        Rich Johnson
      2. lucene-951.patch
        2 kB
        Michael Busch

        Activity

        Hide
        Michael Busch added a comment -

        Committed. Thanks, Rich!

        Show
        Michael Busch added a comment - Committed. Thanks, Rich!
        Hide
        Michael Busch added a comment -

        With this patch reusing the same TermPositions object for different terms
        works fine now. It includes a testcase that shows the bug. All tests pass.

        Show
        Michael Busch added a comment - With this patch reusing the same TermPositions object for different terms works fine now. It includes a testcase that shows the bug. All tests pass.
        Hide
        Michael Busch added a comment -

        Shame on me, this is a pretty bad typo!
        Rich, thank you for finding this. The patch is good. I'll
        add a testcase that hits this bug and commit it shortly.

        Show
        Michael Busch added a comment - Shame on me, this is a pretty bad typo! Rich, thank you for finding this. The patch is good. I'll add a testcase that hits this bug and commit it shortly.
        Hide
        Yonik Seeley added a comment -

        Interesting... I wonder why none of our current tests hit this bug.

        Show
        Yonik Seeley added a comment - Interesting... I wonder why none of our current tests hit this bug.

          People

          • Assignee:
            Michael Busch
            Reporter:
            Rich Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development