Documents gets score unexpectedly


#1

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


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?


(Alexander Reelsen) #2

You can use the explain API on a per document base or the explain parameter in the search query to find out more about your scoring

--Alex