Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      A ConstantScoreQuery is like a boosted query, but it produces the same score for every document that matches the query. The score produced is equal to the query boost. The ^= operator is used to turn any query clause into a ConstantScoreQuery.

      Constant Score Query Examples:

      +color:blue^=1 text:shoes
      (inStock:true text:heliosearch)^=100 native code faceting
      

      Syntax rational: since boosting (multiplication) is term^value, the syntax for having a constant score can be term^=value

      1. SOLR-7218.patch
        10 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        Here's the patch.

        Show
        Yonik Seeley added a comment - Here's the patch.
        Hide
        ASF subversion and git services added a comment -

        Commit 1666183 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1666183 ]

        SOLR-7218: Use ^= for constant score query

        Show
        ASF subversion and git services added a comment - Commit 1666183 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1666183 ] SOLR-7218 : Use ^= for constant score query
        Hide
        ASF subversion and git services added a comment -

        Commit 1666186 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1666186 ]

        SOLR-7218: Use ^= for constant score query

        Show
        ASF subversion and git services added a comment - Commit 1666186 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1666186 ] SOLR-7218 : Use ^= for constant score query
        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:
            Yonik Seeley
            Reporter:
            Yonik Seeley
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development