constant-score-query.asciidoc 472 B

123456789101112131415161718
  1. [[query-dsl-constant-score-query]]
  2. === Constant Score Query
  3. A query that wraps another query and simply returns a
  4. constant score equal to the query boost for every document in the
  5. filter. Maps to Lucene `ConstantScoreQuery`.
  6. [source,js]
  7. --------------------------------------------------
  8. {
  9. "constant_score" : {
  10. "filter" : {
  11. "term" : { "user" : "kimchy"}
  12. },
  13. "boost" : 1.2
  14. }
  15. }
  16. --------------------------------------------------