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

Bug in SegmentTermPositions if used for first term in the dictionary

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

        1. lucene-955.patch
          3 kB
          Michael Busch

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: