[[query-dsl-constant-score-query]]
=== Constant score query
++++
Constant score
++++
Wraps a <> and returns every matching
document with a <> equal to the `boost`
parameter value.
[source,console]
----
GET /_search
{
  "query": {
    "constant_score": {
      "filter": {
        "term": { "user.id": "kimchy" }
      },
      "boost": 1.2
    }
  }
}
----
[[constant-score-top-level-params]]
==== Top-level parameters for `constant_score`
`filter`::
+
--
(Required, query object) <> you wish to run.
Any returned documents must match this query.
Filter queries do not calculate <>. To
speed up performance, {es} automatically caches frequently used filter queries.
--
`boost`::
(Optional, float) Floating point number used as the constant
<> for every document matching the
`filter` query. Defaults to `1.0`.