Lucene - Core
  1. Lucene - Core
  2. LUCENE-6912

Grouping's Collectors should have smart needsScores()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Component/s: modules/grouping
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The Grouping module has numerous Collector implementations, and only a couple perhaps override needsScore() with an optimal choice. Lets do this for all of them.

      1. LUCENE_6912.patch
        18 kB
        David Smiley

        Activity

        Hide
        David Smiley added a comment -

        Here's a patch.

        The trickiest part was debugging the fact that CachingCollector (in Lucene core) has a ScoreCachingCollector that did not override needsScores() to be true; and that tripped test failures in TestGrouping.testRandom(). Boy does that test method need refactoring, by the way; I'm so glad to be done tracing through it!

        Show
        David Smiley added a comment - Here's a patch. The trickiest part was debugging the fact that CachingCollector (in Lucene core) has a ScoreCachingCollector that did not override needsScores() to be true; and that tripped test failures in TestGrouping.testRandom(). Boy does that test method need refactoring, by the way; I'm so glad to be done tracing through it!
        Hide
        ASF subversion and git services added a comment -

        Commit 1718009 from David Smiley in branch 'dev/trunk'
        [ https://svn.apache.org/r1718009 ]

        LUCENE-6912: Grouping's Collectors now calculate a needsScores() instead of always 'true'.
        In core, CachingCollector should have always returned true when scores are cached (small bug).

        Show
        ASF subversion and git services added a comment - Commit 1718009 from David Smiley in branch 'dev/trunk' [ https://svn.apache.org/r1718009 ] LUCENE-6912 : Grouping's Collectors now calculate a needsScores() instead of always 'true'. In core, CachingCollector should have always returned true when scores are cached (small bug).
        Hide
        ASF subversion and git services added a comment -

        Commit 1718011 from David Smiley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1718011 ]

        LUCENE-6912: Grouping's Collectors now calculate a needsScores() instead of always 'true'.
        In core, CachingCollector should have always returned true when scores are cached (small bug).

        Show
        ASF subversion and git services added a comment - Commit 1718011 from David Smiley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1718011 ] LUCENE-6912 : Grouping's Collectors now calculate a needsScores() instead of always 'true'. In core, CachingCollector should have always returned true when scores are cached (small bug).

          People

          • Assignee:
            David Smiley
            Reporter:
            David Smiley
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development