# How can i change the score

**URL:** <https://discuss.elastic.co/t/how-can-i-change-the-score/39048>\
**Category:** 中文提问与讨论\
**Created:** [January 13, 2016, 1:50am UTC](https://discuss.elastic.co/t/how-can-i-change-the-score/39048 "2016-01-13T01:50:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LDA-MAN](https://avatars.discourse-cdn.com/v4/letter/l/a3d4f5/32.png) [@LDA-MAN](https://discuss.elastic.co/u/LDA-MAN)\
**Post date:** [January 13, 2016, 1:50am UTC](https://discuss.elastic.co/t/how-can-i-change-the-score/39048/1 "2016-01-13T01:50:43Z")

</div>

this is my input text. ![](https://us1.discourse-cdn.com/elastic/original/2X/5/540e46715167eb92f2f85594068309d26715f903.png)

and the result..

 ![](https://us1.discourse-cdn.com/elastic/original/2X/b/b0316d45c83ebfa9e56cbde92b7636442fd1ac06.png)  
this is not what i want! i think the 'last ' should in first ，  
how can i change the score  
this is the tf-idf  
"hits" : {  
"total" : 4353,  
"max\_score" : 2.576459,  
"hits" : [ {  
"\_shard" : 0,  
"\_node" : "7f44fuF8RtKFIgtN1ww\_KQ",  
"\_index" : "indicator\_v2",  
"\_type" : "indicator\_v2",  
"\_id" : "00010000862572",  
"\_score" : 2.576459,  
"\_source":{"indicatorCode":"00010000862572","nameZh":"蛋类（元）","nameEn":"蛋类（元）","cpnNameZh":"城镇最低收入户居民家庭人均蛋类现金消费总支出（元）","mgNameZh":"人民生活--城镇居民基本生活状况--城镇居民收入与支出（抽样数据）--城镇居民平均支出--按收入等级分城镇居民家庭支出--城镇居民家庭支出金额--最低收入户--平均每人现金消费总支出（元）--食品（元）--蛋类（元）","parentId":null,"freqId":1,"startDate":"1995-01-01 00:00:00","lastDate":"2012-01-01 00:00:00","cubeId":1,"isValid":0,"descZh":null,"commentZh":null,"sourceZh":"中国统计年鉴","orgZh":"中国国家统计局","addTime":null,"lastMtime":null,"typeId":"0902","typeName":"消费","tag":[{"tagId":"4291","tagName":"城镇居民平均支出"},{"tagId":"4292","tagName":"平均每人现金消费总支出"},{"tagId":"5562","tagName":"食品"},{"tagId":"8269","tagName":"城镇居民收入与支出"},{"tagId":"9566","tagName":"城镇居民基本生活状况"},{"tagId":"10919","tagName":"按收入等级分城镇居民家庭支出"},{"tagId":"10920","tagName":"城镇居民家庭支出金额"},{"tagId":"10921","tagName":"蛋类"},{"tagId":"12215","tagName":"人民生活"},{"tagId":"12243","tagName":"最低收入户"}]},  
"highlight" : {  
"nameZh" : ["\<em style="color:#ff8a61"\>蛋类（元）"]  
},  
"\_explanation" : {  
"value" : 2.576459,  
"description" : "product of:",  
"details" : [ {  
"value" : 5.152918,  
"description" : "sum of:",  
"details" : [ {  
"value" : 2.3387063,  
"description" : "weight(nameZh:蛋类 in 364) [PerFieldSimilarity], result of:",  
"details" : [ {  
"value" : 2.3387063,  
"description" : "score(doc=364,freq=1.0), product of:",  
"details" : [ {  
"value" : 0.4252728,  
"description" : "queryWeight, product of:",  
"details" : [ {  
"value" : 10.998617,  
"description" : "idf(docFreq=39, maxDocs=879841)"  
}, {  
"value" : 0.038666025,  
"description" : "queryNorm"

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [January 13, 2016, 12:35pm UTC](https://discuss.elastic.co/t/how-can-i-change-the-score/39048/2 "2016-01-13T12:35:43Z")

</div>

I've recategorized this post into the "Elastic In Your Native Tongue \> 中文提问与讨论" category. I think it may help get you a response sooner.

---

<div class="post-metadata">

**Author:** ![medcl.net](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/medcl.net/32/4414_2.png) [@medcl.net](https://discuss.elastic.co/u/medcl.net)\
**Post date:** [January 14, 2016, 3:28am UTC](https://discuss.elastic.co/t/how-can-i-change-the-score/39048/3 "2016-01-14T03:28:51Z")

</div>

能提供一下你的查询QueryDSL么？我看看你是怎么写的，另外你的mapping是如何配置analyzer的，mapping方便也贴一下。

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:50pm UTC](https://discuss.elastic.co/t/how-can-i-change-the-score/39048/4 "2017-07-06T13:50:04Z")

</div>


