In Kibana "Discover", when querying the _score is always 0 for all results


(Aislinn Cronin) #1

When querying an index pattern in the Discover tab, all results have a _score as 0. However, when querying the same indices in the Kibana console, _score is not returned as 0.

Does anyone know why this is happening?


(Felix Stürmer) #2

Hi @Aislinn_Cronin,

the reason is that Discover includes a sort clause in the query. That means that scores are not tracked to avoid using extra resources.


(Aislinn Cronin) #3

thanks for the reply! is there a way to update the settings to have the score be calculated in Discover?


(Felix Stürmer) #4

If you add _score as a column and sort by it, it should be calculated.


(Aislinn Cronin) #5

I actually tried that. I tried again and still no luck. Adding _score as a selected field and sorting by doesnt seem to work. The scores for all docs show 0.


(Felix Stürmer) #6

Hm, I can not reproduce that problem:

Sorting by timestamp - score is not tracked
image

Sorting by _score - score is tracked
image

Can you share with us the request and response for the search sorted by _score, which is displayed in the inspector?
image