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

ContainingIntervalIterator can incorrectly report positions after exhaustion

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.1
    • None
    • None
    • New

    Description

      ContainedByIntervalIterator and OverlappingIntervalIterator set their 'is the filter interval exhausted' flag to `false` once it has returned NO_MORE_POSITIONS on a document, so that subsequent calls to `startPosition()` will also return NO_MORE_POSITIONS.  ContainingIntervalIterator omits to do this, and so it can incorrectly report matches, for example when used in a disjunction.

      cc dweiss 

      Attachments

        Issue Links

          Activity

            tomoko Tomoko Uchida added a comment -

            This issue was moved to GitHub issue: #11443.

            tomoko Tomoko Uchida added a comment - This issue was moved to GitHub issue: #11443 .
            jpountz Adrien Grand added a comment -

            Closing after the 9.1.0 release.

            jpountz Adrien Grand added a comment - Closing after the 9.1.0 release.

            Commit 8e5a88f2d5ec68b98ff8898b42686ad7fe5216d7 in lucene's branch refs/heads/branch_9x from Alan Woodward
            [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=8e5a88f ]

            LUCENE-10407: Set bpos flag to true when containing filter is exhausted (#648)

            ContainedByIntervalIterator and OverlappingIntervalIterator set their 'is the filter
            interval exhausted' flag to `false` once it has returned NO_MORE_POSITIONS on
            a document, so that subsequent calls to `startPosition()` will also return
            NO_MORE_POSITIONS. ContainingIntervalIterator omits to do this, and so it can
            incorrectly report matches, for example when used in a disjunction. This commit
            fixes that omission.

            jira-bot ASF subversion and git services added a comment - Commit 8e5a88f2d5ec68b98ff8898b42686ad7fe5216d7 in lucene's branch refs/heads/branch_9x from Alan Woodward [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=8e5a88f ] LUCENE-10407 : Set bpos flag to true when containing filter is exhausted (#648) ContainedByIntervalIterator and OverlappingIntervalIterator set their 'is the filter interval exhausted' flag to `false` once it has returned NO_MORE_POSITIONS on a document, so that subsequent calls to `startPosition()` will also return NO_MORE_POSITIONS. ContainingIntervalIterator omits to do this, and so it can incorrectly report matches, for example when used in a disjunction. This commit fixes that omission.

            Commit 6b64f4b556ed13682a6adbad7884e4ac4044b397 in lucene's branch refs/heads/main from Alan Woodward
            [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=6b64f4b ]

            LUCENE-10407: Set bpos flag to true when containing filter is exhausted (#648)

            ContainedByIntervalIterator and OverlappingIntervalIterator set their 'is the filter
            interval exhausted' flag to `false` once it has returned NO_MORE_POSITIONS on
            a document, so that subsequent calls to `startPosition()` will also return
            NO_MORE_POSITIONS. ContainingIntervalIterator omits to do this, and so it can
            incorrectly report matches, for example when used in a disjunction. This commit
            fixes that omission.

            jira-bot ASF subversion and git services added a comment - Commit 6b64f4b556ed13682a6adbad7884e4ac4044b397 in lucene's branch refs/heads/main from Alan Woodward [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=6b64f4b ] LUCENE-10407 : Set bpos flag to true when containing filter is exhausted (#648) ContainedByIntervalIterator and OverlappingIntervalIterator set their 'is the filter interval exhausted' flag to `false` once it has returned NO_MORE_POSITIONS on a document, so that subsequent calls to `startPosition()` will also return NO_MORE_POSITIONS. ContainingIntervalIterator omits to do this, and so it can incorrectly report matches, for example when used in a disjunction. This commit fixes that omission.

            People

              romseygeek Alan Woodward
              romseygeek Alan Woodward
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m