Lucene - Core
  1. Lucene - Core
  2. LUCENE-6262

No need to wrap with ConstantWeight when needsScores is false

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Today ConstantScoreQuery always wraps the inner weight into a ConstantWeight, but this is only necessary if scores are needed.

        Activity

        Hide
        Adrien Grand added a comment -

        Simple patch.

        Show
        Adrien Grand added a comment - Simple patch.
        Hide
        Ryan Ernst added a comment -

        +1

        Show
        Ryan Ernst added a comment - +1
        Hide
        ASF subversion and git services added a comment -

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

        LUCENE-6262: Don't wrap the inner weight in ConstantScoreQuery when scores are not required.

        Show
        ASF subversion and git services added a comment - Commit 1661367 from Adrien Grand in branch 'dev/trunk' [ https://svn.apache.org/r1661367 ] LUCENE-6262 : Don't wrap the inner weight in ConstantScoreQuery when scores are not required.
        Hide
        Uwe Schindler added a comment -

        Thanks!

        Show
        Uwe Schindler added a comment - Thanks!
        Hide
        Adrien Grand added a comment -

        You're welcome.

        Show
        Adrien Grand added a comment - You're welcome.
        Hide
        ASF subversion and git services added a comment -

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

        LUCENE-6262: Don't wrap the inner weight in ConstantScoreQuery when scores are not required.

        Show
        ASF subversion and git services added a comment - Commit 1661371 from Adrien Grand in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1661371 ] LUCENE-6262 : Don't wrap the inner weight in ConstantScoreQuery when scores are not required.
        Hide
        Timothy Potter added a comment -

        Bulk close after 5.1 release

        Show
        Timothy Potter added a comment - Bulk close after 5.1 release

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development