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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0-BETA, 6.0
    • core/search
    • None
    • 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. Test2LUCENE2590.java
          6 kB
          Koji Sekiguchi
        2. LUCENE-2686.patch
          26 kB
          Michael McCandless
        3. LUCENE-2686.patch
          29 kB
          Michael McCandless

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: