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

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

    Details

    • Type: Test
    • Status: Closed
    • Priority: 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
        jpountz Adrien Grand added a comment -

        Here is a patch.

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

        +1

        Show
        rcmuir Robert Muir added a comment - +1
        Hide
        jira-bot 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
        jira-bot 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
        jira-bot 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
        jira-bot 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
        jira-bot 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
        jira-bot 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
        shalinmangar Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development