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

SpanNotWeight returns wrong results due to integer overflow

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

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

        Activity

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment