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

DisjunctionSumScorer gives slightly (float iotas) different scores when you .nextDoc vs .advance

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.5, 4.0-ALPHA
    • None
    • None
    • New

    Description

      Spinoff from LUCENE-1536.

      I dug into why we hit a score diff when using luceneutil to benchmark
      the patch.

      At first I thought it was BS1/BS2 difference, but because of a bug in
      the patch it was still using BS2 (but should be BS1) – Robert's last
      patch fixes that.

      But it's actually a diff in BS2 itself, whether you next or advance
      through the docs.

      It's because DisjunctionSumScorer, when summing the float scores for a
      given doc that matches multiple sub-scorers, might sum in a different
      order, when you had .nextDoc'd to that doc than when you had .advance'd
      to it.

      This in turn is because the PQ used by that scorer (ScorerDocQueue)
      makes no effort to break ties. So, when the top N scorers are on the
      same doc, the PQ doesn't care what order they are in.

      Fixing ScorerDocQueue to break ties will likely be a non-trivial perf
      hit, though, so I'm not sure whether we should do anything here...

      Attachments

        1. LUCENE-3503.patch
          5 kB
          Robert Muir
        2. LUCENE-3503.patch
          5 kB
          Robert Muir
        3. LUCENE-3503.patch
          4 kB
          Michael McCandless

        Issue Links

        Activity

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

          People

            rcmuir Robert Muir
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment