Lucene - Core
  1. Lucene - Core
  2. LUCENE-5694

Fix Disjunction*Scorer not to score unless you ask it to

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      These things scored implicitly on next()/advance() for historical reasons: but now that minShouldMatch is split apart we should remove this, its unnecessary.

      This allows us to remove the horrendous afterNext and clean things up, too.

        Activity

        Hide
        Robert Muir added a comment -

        patch.

        Show
        Robert Muir added a comment - patch.
        Hide
        Robert Muir added a comment -

        If you disable BS1 in luceneutil, it will appear this patch gives a speedup, but from my investigation this is just trickery.

        I did further benchmarking to hone in and its just the same speed.

        But it can be beneficial in cases where score() is not called (ConstantScoreQuery, constructing a filter, when there are multiple prohibited clauses, etc etc)

        Show
        Robert Muir added a comment - If you disable BS1 in luceneutil, it will appear this patch gives a speedup, but from my investigation this is just trickery. I did further benchmarking to hone in and its just the same speed. But it can be beneficial in cases where score() is not called (ConstantScoreQuery, constructing a filter, when there are multiple prohibited clauses, etc etc)
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1596907 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1596907 ]

        LUCENE-5694: don't score subscorers in DisjunctionSum/Max unless score is called

        Show
        ASF subversion and git services added a comment - Commit 1596907 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1596907 ] LUCENE-5694 : don't score subscorers in DisjunctionSum/Max unless score is called
        Hide
        ASF subversion and git services added a comment -

        Commit 1596914 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1596914 ]

        LUCENE-5694: don't score subscorers in DisjunctionSum/Max unless score is called

        Show
        ASF subversion and git services added a comment - Commit 1596914 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1596914 ] LUCENE-5694 : don't score subscorers in DisjunctionSum/Max unless score is called

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development