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

DisjunctionSumScorer should not call .score on sub scorers until consumer calls .score

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-BETA, 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Spinoff from java-user thread "question about Scorer.freq()" from Koji...

      BooleanScorer2 uses DisjunctionSumScorer to score only-SHOULD-clause boolean queries.

      But, this scorer does too much work for collectors that never call .score, because it scores while it's matching. It should only call .score on the subs when the caller calls its .score.

      This also has the side effect of messing up advanced collectors that gather the freq() of the subs (using LUCENE-2590).

        Attachments

        1. LUCENE-2686.patch
          29 kB
          Michael McCandless
        2. LUCENE-2686.patch
          26 kB
          Michael McCandless
        3. Test2LUCENE2590.java
          6 kB
          Koji Sekiguchi

          Issue Links

            Activity

              People

              • Assignee:
                mikemccand Michael McCandless
                Reporter:
                mikemccand Michael McCandless
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: