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

**URL:** <https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426>\
**Category:** Kibana\
**Created:** [November 5, 2018, 3:50pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426 "2018-11-05T15:50:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aislinn\_Cronin](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Aislinn\_Cronin](https://discuss.elastic.co/u/Aislinn_Cronin)\
**Post date:** [November 5, 2018, 3:50pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/1 "2018-11-05T15:50:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [November 5, 2018, 4:07pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/2 "2018-11-05T16:07:25Z")

</div>

Hi @Aislinn_Cronin,

the reason is that Discover includes a `sort` clause in the query. That means that [scores are not tracked](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_track_scores) to avoid using extra resources.

---

<div class="post-metadata">

**Author:** ![Aislinn\_Cronin](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Aislinn\_Cronin](https://discuss.elastic.co/u/Aislinn_Cronin)\
**Post date:** [November 5, 2018, 4:42pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/3 "2018-11-05T16:42:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [November 5, 2018, 6:21pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/4 "2018-11-05T18:21:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Aislinn\_Cronin](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Aislinn\_Cronin](https://discuss.elastic.co/u/Aislinn_Cronin)\
**Post date:** [November 5, 2018, 6:46pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/5 "2018-11-05T18:46:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [November 15, 2018, 12:29pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/6 "2018-11-15T12:29:31Z")

</div>

Hm, I can not reproduce that problem:

_Sorting by timestamp - score is not tracked_  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b717ae28a661a0278e41d74d9c680559bec6ce1.png)

_Sorting by \_score - score is tracked_  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c7629ee3bfb5d033b6a668d3680a0679a8872999.png)

Can you share with us the request and response for the search sorted by `_score`, which is displayed in the inspector?  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9fd0860397be99c30ce94a76765774e48a0c2adb.png)

---

<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 13, 2018, 12:34pm UTC](https://discuss.elastic.co/t/in-kibana-discover-when-querying-the-score-is-always-0-for-all-results/155426/7 "2018-12-13T12:34:26Z")

</div>

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