# Documents gets score unexpectedly

**URL:** <https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159>\
**Category:** Elasticsearch\
**Created:** [December 3, 2018, 11:56am UTC](https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159 "2018-12-03T11:56:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zivari](https://avatars.discourse-cdn.com/v4/letter/z/9e8a1a/32.png) [@zivari](https://discuss.elastic.co/u/zivari)\
**Post date:** [December 3, 2018, 11:56am UTC](https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159/1 "2018-12-03T11:56:02Z")

</div>

Hey guys,

Iv noticed that when i use an empty query all of my docs are getting a score of 2.  
this is my query:  
{  
"query": {  
"bool": {  
"should": [  
{  
"bool": {}  
}  
]  
}  
},  
"sort": [  
{  
"\_score": {  
"order": "desc"  
}  
},  
{  
"search\_sort\_b": {  
"order": "desc"  
}  
}  
]  
}

and these are my results

 ![27](https://us1.discourse-cdn.com/elastic/original/3X/4/8/48fdd7338b25489245aca6b4cc7e30ec9313ba4b.png)  
i would expect this query will result returning all documents, when each one is given 0 score  
even when i remove the "should" clause. they still get score of 2.

can anyone explain why?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 3, 2018, 5:02pm UTC](https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159/2 "2018-12-03T17:02:23Z")

</div>

You can use the [explain API](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-explain.html) on a per document base or the [explain parameter in the search query](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/search-request-explain.html) to find out more about your scoring

--Alex

---

<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:** [December 31, 2018, 5:02pm UTC](https://discuss.elastic.co/t/documents-gets-score-unexpectedly/159159/3 "2018-12-31T17:02:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
