Access _score from Sort script

Hi,

I am trying to sort using a script sort.
My script would look like: _score * doc['someField'].value
When I submit the query I am getting: unresolvable property or identifier:
_score

Is it not possible to use the score in a script sort?

Thanks!

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/89f52074-c2c5-4e35-a779-0e0aeb567931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi ,

Its doable from here -

Thanks
Vineeth

On Tue, Jul 29, 2014 at 7:53 AM, Maxime Nay maximenay@gmail.com wrote:

Hi,

I am trying to sort using a script sort.
My script would look like: _score * doc['someField'].value
When I submit the query I am getting: unresolvable property or identifier:
_score

Is it not possible to use the score in a script sort?

Thanks!

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/89f52074-c2c5-4e35-a779-0e0aeb567931%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/89f52074-c2c5-4e35-a779-0e0aeb567931%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5kqbZL4yLgZDXRXo4D7_g0m%2BkV%2BXepZGrE6FrLdBJav8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Vineeth,

I want to use the score for some other purpose. (retrieve the number of
children with a has_child query)
Hence I can't modify it's calculation in script score.

On Monday, July 28, 2014 7:53:01 PM UTC-7, vineeth mohan wrote:

Hi ,

Its doable from here -
Elasticsearch Platform — Find real-time answers at scale | Elastic

Thanks
Vineeth

On Tue, Jul 29, 2014 at 7:53 AM, Maxime Nay <maxi...@gmail.com
<javascript:>> wrote:

Hi,

I am trying to sort using a script sort.
My script would look like: _score * doc['someField'].value
When I submit the query I am getting: unresolvable property or
identifier: _score

Is it not possible to use the score in a script sort?

Thanks!

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/89f52074-c2c5-4e35-a779-0e0aeb567931%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/89f52074-c2c5-4e35-a779-0e0aeb567931%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f829c726-cf0b-40d5-8d30-96d3b4c3b008%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.