Documents gets score unexpectedly

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?

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

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