# Possibly incorrect behavior with track\_scores=true when sorting on a field

**URL:** https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720
**Category:** Elasticsearch
**Created:** [April 28, 2013, 9:04am UTC](https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720 "2013-04-28T09:04:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [April 28, 2013, 9:04am UTC](https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720/1 "2013-04-28T09:04:16Z")

</div>

Hello,

If I understand correctly from the  
documentation[http://www.elasticsearch.org/guide/reference/api/search/uri-request/](http://www.elasticsearch.org/guide/reference/api/search/uri-request/),  
I can use the _track\_scores_ parameter to have ES show the scores of each  
hit, even when I'm not sorting on score.

I've tested this on 0.90.0.RC2 but it seems that it doesn't work.

Here's a curl recreation of the problem:

> <https://gist.github.com/radu-gheorghe/5476348>

Is this a bug or am I doing something wrong?

## Thanks and best regards, Radu

[http://sematext.com/](http://sematext.com/) -- ElasticSearch -- Solr -- Lucene

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [May 2, 2013, 7:30am UTC](https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720/2 "2013-05-02T07:30:59Z")

</div>

Has anyone else seen this? Should I open an issue on Github?

Best regards,  
Radu

On Sun, Apr 28, 2013 at 12:04 PM, Radu Gheorghe  
[radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)wrote:

> Hello,
> 
> If I understand correctly from the documentation[http://www.elasticsearch.org/guide/reference/api/search/uri-request/](http://www.elasticsearch.org/guide/reference/api/search/uri-request/),  
> I can use the _track\_scores_ parameter to have ES show the scores of each  
> hit, even when I'm not sorting on score.
> 
> I've tested this on 0.90.0.RC2 but it seems that it doesn't work.
> 
> Here's a curl recreation of the problem:  
> [Elasticsearch should still show scores for each hit when sorting on a field and track\_scores is true · GitHub](https://gist.github.com/radu-gheorghe/5476348)
> 
> Is this a bug or am I doing something wrong?
> 
> ## Thanks and best regards, Radu
> 
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)
#### Post date: [May 2, 2013, 8:00pm UTC](https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720/3 "2013-05-02T20:00:49Z")

</div>

Hi Radu

You're right, it is a bug. It doesn't with the the ?q= search form. it does  
however work with the query body

ta

clint

On Thu, May 2, 2013 at 9:30 AM, Radu Gheorghe [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)wrote:

> Has anyone else seen this? Should I open an issue on Github?
> 
> Best regards,  
> Radu
> 
> On Sun, Apr 28, 2013 at 12:04 PM, Radu Gheorghe \<  
> [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)\> wrote:
> 
> > Hello,
> > 
> > If I understand correctly from the documentation[http://www.elasticsearch.org/guide/reference/api/search/uri-request/](http://www.elasticsearch.org/guide/reference/api/search/uri-request/),  
> > I can use the _track\_scores_ parameter to have ES show the scores of  
> > each hit, even when I'm not sorting on score.
> > 
> > I've tested this on 0.90.0.RC2 but it seems that it doesn't work.
> > 
> > Here's a curl recreation of the problem:  
> > [Elasticsearch should still show scores for each hit when sorting on a field and track\_scores is true · GitHub](https://gist.github.com/radu-gheorghe/5476348)
> > 
> > Is this a bug or am I doing something wrong?
> > 
> > ## Thanks and best regards, Radu
> > 
> > [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> --  
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [May 3, 2013, 5:38pm UTC](https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720/4 "2013-05-03T17:38:35Z")

</div>

Thanks a lot, Clint!

I've opened this issue:

> <https://github.com/elastic/elasticsearch/issues/2986>
>
> Using \[URI reqeust\](http://www.elasticsearch.org/guide/reference/api/search/uri-…request/) queries, the \_track\_scores\_ parameter doesn't work.
> 
> Here's a curl recreation of the problem:
> https://gist.github.com/radu-gheorghe/5476348
> 
> @clintongormley confirmed and says it works with query body types of queries. Thanks, Clint!

Best regards,  
Radu

On Thu, May 2, 2013 at 11:00 PM, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)wrote:

> Hi Radu
> 
> You're right, it is a bug. It doesn't with the the ?q= search form. it  
> does however work with the query body
> 
> ta
> 
> clint
> 
> On Thu, May 2, 2013 at 9:30 AM, Radu Gheorghe [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)wrote:
> 
> > Has anyone else seen this? Should I open an issue on Github?
> > 
> > Best regards,  
> > Radu
> > 
> > On Sun, Apr 28, 2013 at 12:04 PM, Radu Gheorghe \<  
> > [radu.gheorghe@sematext.com](mailto:radu.gheorghe@sematext.com)\> wrote:
> > 
> > > Hello,
> > > 
> > > If I understand correctly from the documentation[http://www.elasticsearch.org/guide/reference/api/search/uri-request/](http://www.elasticsearch.org/guide/reference/api/search/uri-request/),  
> > > I can use the _track\_scores_ parameter to have ES show the scores of  
> > > each hit, even when I'm not sorting on score.
> > > 
> > > I've tested this on 0.90.0.RC2 but it seems that it doesn't work.
> > > 
> > > Here's a curl recreation of the problem:  
> > > [Elasticsearch should still show scores for each hit when sorting on a field and track\_scores is true · GitHub](https://gist.github.com/radu-gheorghe/5476348)
> > > 
> > > Is this a bug or am I doing something wrong?
> > > 
> > > ## Thanks and best regards, Radu
> > > 
> > > [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> > 
> > --  
> > [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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: [July 6, 2017, 2:38am UTC](https://discuss.elastic.co/t/possibly-incorrect-behavior-with-track-scores-true-when-sorting-on-a-field/11720/5 "2017-07-06T02:38:26Z")

</div>


