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

SpanNotWeight returns wrong results due to integer overflow

Details

    • New, Patch Available

    Description

      In SpanNotQuery, there is an acceptance condition:

      if (candidate.endPosition() + post <= excludeSpans.startPosition()) {
          return AcceptStatus.YES;
      }
      

      This overflows in case `candidate.endPosition() + post > Integer.MAX_VALUE`. I have a fix for this which I am working on. Basically I am flipping the add to a subtract.

      Attachments

        1. LUCENE-8034.patch
          2 kB
          Hari Menon

        Activity

          People

            Unassigned Unassigned
            hshankar Hari Menon
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: