Lucene - Core
  1. Lucene - Core
  2. LUCENE-6708

TopFieldCollector sometimes calls Scorer.score() several times on the same doc

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      If the sort spec includes a sort field that needs scores, and if trackDocScores or trackMaxScore is set, then TopFieldCollectors may compute the score several times on the same document, once to check whether the hit is competitive, and once to update maxScore or to set the score on the ScoreDoc.

      1. LUCENE-6708.patch
        20 kB
        Adrien Grand

        Activity

        Hide
        Adrien Grand added a comment -

        Here is a patch. I also took opportunity of this change to reduce over-specialization of our 3 top-field collectors (non-scoring, scoring-no-max and scoring-max) by merging them into a single class.

        Show
        Adrien Grand added a comment - Here is a patch. I also took opportunity of this change to reduce over-specialization of our 3 top-field collectors (non-scoring, scoring-no-max and scoring-max) by merging them into a single class.
        Hide
        ASF subversion and git services added a comment -

        Commit 1694435 from Adrien Grand in branch 'dev/trunk'
        [ https://svn.apache.org/r1694435 ]

        LUCENE-6708: TopFieldCollector does not compute the score several times on the same document anymore.

        Show
        ASF subversion and git services added a comment - Commit 1694435 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1694435 ] LUCENE-6708 : TopFieldCollector does not compute the score several times on the same document anymore.
        Hide
        ASF subversion and git services added a comment -

        Commit 1694442 from Adrien Grand in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1694442 ]

        LUCENE-6708: TopFieldCollector does not compute the score several times on the same document anymore.

        Show
        ASF subversion and git services added a comment - Commit 1694442 from Adrien Grand in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1694442 ] LUCENE-6708 : TopFieldCollector does not compute the score several times on the same document anymore.

          People

          • Assignee:
            Adrien Grand
            Reporter:
            Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development