# Is it possible to change the score mode of SHOULD clause?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-change-the-score-mode-of-should-clause/23694>\
**Category:** Elasticsearch\
**Created:** [May 27, 2015, 4:57am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-score-mode-of-should-clause/23694 "2015-05-27T04:57:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [May 27, 2015, 4:57am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-score-mode-of-should-clause/23694/1 "2015-05-27T04:57:53Z")

</div>

For example I have following 2 documents:

{"id":"1", "title":"elasticsearch", " description":"elasticsearch" }

{"id":"1", "title":"elasticsearch", " description":"bing" }

And following query:  
{  
"query" : {  
"bool": {  
"should": [  
{  
"match": {  
"title": {  
"query": "elasticsearch"  
}  
}  
},  
{  
"match": {  
"description": {  
"query": "elasticsearch"  
}  
}  
}]  
}  
}  
}

The result score of documetn "1" is just the _SUM_ of the scores of 2 sub  
should clause, since both title and description contains "elasticsearch":

\_explanation:  
{  
value: 0.4339554  
_description: "sum of:_"  
details: [2]  
0:  
{  
value: 0.2169777  
description: "weight(title:google in 0) [PerFieldSimilarity], result of:"  
}  
1:  
{  
value: 0.2169777  
description: "weight(description:google in 0) [PerFieldSimilarity], result  
of:"  
}  
}

The result score of document "2", however, is different:

explanation:  
{  
value: 0.04500804  
_description: "product of:"_  
details: [2]  
0:  
{  
value: 0.09001608  
}  
1:  
{  
value: 0.5  
_description: "coord(1/2)"_  
}

The final score if NOT "_SUM of"_ but _"product of"_, I think it is because  
in document "2", the "description" field does not contains  
"elastticsearch", that is, half of all sub should clause match the query  
term, that is why \*coord(1/2) \*comes in explanation.

My question is, is it possible to change the score mode of SHOULD clause so  
that, the final score of SHOULD clause is always the \*SUM \*of sub clause,  
no matter whether the sub clause match the query term or not?

## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30417c8c-35a5-427c-989b-dff063d23eeb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30417c8c-35a5-427c-989b-dff063d23eeb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![davidbkemp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidbkemp/32/594_2.png) [@davidbkemp](https://discuss.elastic.co/u/davidbkemp)\
**Post date:** [May 28, 2015, 7:40am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-score-mode-of-should-clause/23694/2 "2015-05-28T07:40:25Z")

</div>

Have you tried the disable\_coord feature of bool queries?  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html)

It might give you what you need.

## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/61402bae-4ff5-42f9-bd4f-046cc7fc9972%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/61402bae-4ff5-42f9-bd4f-046cc7fc9972%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:11am UTC](https://discuss.elastic.co/t/is-it-possible-to-change-the-score-mode-of-should-clause/23694/3 "2017-07-06T00:11:26Z")

</div>


