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

Bug in SegmentTermPositions if used for first term in the dictionary

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: