Has Parent and sorting on a parent's properties

With a Has Parent filter or query, is there a way to sort on one or more of
the parent's properties?

I've tried using a sorting script, but all of my attempts generated errors.
E.g.
"script": "doc._parent['number'].value",
"script": "doc.parent['number'].value",

"script": "doc['_parent']['number'].value",
"script": "doc['parent']['number'].value",

Thanks!
Nick

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

This isn't possible via script sorting. However this possible via the
custom_score query:

I'll need to include this query as inner query in the has_parent query.

On 23 July 2013 18:35, Nick Hoffman nick@deadorange.com wrote:

With a Has Parent filter or query, is there a way to sort on one or more
of the parent's properties?

I've tried using a sorting script, but all of my attempts generated
errors. E.g.
"script": "doc._parent['number'].value",
"script": "doc.parent['number'].value",

"script": "doc['_parent']['number'].value",
"script": "doc['parent']['number'].value",

Thanks!
Nick

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
Met vriendelijke groet,

Martijn van Groningen

--
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.
For more options, visit https://groups.google.com/groups/opt_out.