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

Bug in SegmentTermPositions if used for first term in the dictionary

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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2
    • 2.3
    • core/index
    • None
    • New

    Description

      When a SegmentTermPositions object is reset via seek() it does not move
      the proxStream to the correct position in case the term is the first one
      in the dictionary.

      The reason for this behavior is that the skipStream is only moved if
      lazySkipPointer is != 0. But 0 is a valid value for the posting list of
      the very first term. The fix is easy: We simply have to set lazySkipPointer
      to -1 in case no lazy skip has to be performed and then we only move the
      skipStream if lazySkipPointer!=-1.

      Attachments

        Activity

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

          People

            michaelbusch Michael Busch
            michaelbusch Michael Busch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment