ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# Constant Score 查询 原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/query-dsl-constant-score-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/query-dsl-constant-score-query.html) 译文链接 : [http://www.apache.wiki/pages/viewpage.action?pageId=4882886](http://www.apache.wiki/pages/viewpage.action?pageId=4882886) 贡献者 : [蓝色飞扬](/display/~lixiaoqing) ** [<< Compound queries](/pages/viewpage.action?pageId=4882469)                                                                                                                     [Bool  Query >>](http://www.apache.wiki/pages/viewpage.action?pageId=4882896)** * * * 此查询可对另一个查询进行包装,并简单地返回一个与该过滤器中每个文档的查询提升相等的常量分数, 映射到 **Lucene **即为 **ConstantScoreQuery **。 ``` GET /_search { "query": { "constant_score" : { "filter" : { "term" : { "user" : "kimchy"} }, "boost" : 1.2 } } } ``` * * * ** [<< Compound queries](/pages/viewpage.action?pageId=4882469)                                                                                                                     [Bool  Query >>](http://www.apache.wiki/pages/viewpage.action?pageId=4882896)**