Lucene - Core
  1. Lucene - Core
  2. LUCENE-6526

Make AssertingWeight check that scores are not computed when needsScores is false

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Today nothing prevents you from calling score() if you don't need scores. But we could make AssertingWeight check it in order to make sure that we do not waste resources computing something we don't need.

      1. LUCENE-6526.patch
        12 kB
        Adrien Grand

        Activity

        Hide
        Adrien Grand added a comment -

        Here is a patch.

        Show
        Adrien Grand added a comment - Here is a patch.
        Hide
        Robert Muir added a comment -

        +1

        Show
        Robert Muir added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1683734 from Adrien Grand in branch 'dev/trunk'
        [ https://svn.apache.org/r1683734 ]

        LUCENE-6526: Asserting(Query|Weight|Scorer) now ensure scores are not computed if they are not needed.

        Show
        ASF subversion and git services added a comment - Commit 1683734 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1683734 ] LUCENE-6526 : Asserting(Query|Weight|Scorer) now ensure scores are not computed if they are not needed.
        Hide
        ASF subversion and git services added a comment -

        Commit 1683744 from Adrien Grand in branch 'dev/trunk'
        [ https://svn.apache.org/r1683744 ]

        LUCENE-6526: Revert some changes that were committed by mistake.

        Show
        ASF subversion and git services added a comment - Commit 1683744 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1683744 ] LUCENE-6526 : Revert some changes that were committed by mistake.
        Hide
        ASF subversion and git services added a comment -

        Commit 1683745 from Adrien Grand in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1683745 ]

        LUCENE-6526: Asserting(Query|Weight|Scorer) now ensure scores are not computed if they are not needed.

        Show
        ASF subversion and git services added a comment - Commit 1683745 from Adrien Grand in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1683745 ] LUCENE-6526 : Asserting(Query|Weight|Scorer) now ensure scores are not computed if they are not needed.
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Adrien Grand
            Reporter:
            Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development