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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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
        jira-bot 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
        jira-bot 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
        Hide
        jira-bot 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
        jira-bot 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
        mikemccand Michael McCandless added a comment -

        +1

        Show
        mikemccand Michael McCandless added a comment - +1
        Hide
        rcmuir 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
        rcmuir 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
        rcmuir Robert Muir added a comment -

        patch.

        Show
        rcmuir Robert Muir added a comment - patch.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development