# Can I sort has\_child query result by child's numeric field?

**URL:** https://discuss.elastic.co/t/can-i-sort-has-child-query-result-by-childs-numeric-field/18173
**Category:** Elasticsearch
**Created:** [June 18, 2014, 4:41am UTC](https://discuss.elastic.co/t/can-i-sort-has-child-query-result-by-childs-numeric-field/18173 "2014-06-18T04:41:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fiefdx\_yang](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@fiefdx\_yang](https://discuss.elastic.co/u/fiefdx_yang)
#### Post date: [June 18, 2014, 4:41am UTC](https://discuss.elastic.co/t/can-i-sort-has-child-query-result-by-childs-numeric-field/18173/1 "2014-06-18T04:41:56Z")

</div>

I found this:

> **[Document relations - Berlin Buzzwords 2013](https://www.slideshare.net/martijnvg/document-relationsbbuz2013)**
>
> Document relations, parent / child support, nested inner objects

  
it use custom\_score, but it can not work at version 1.2.1.  
I try to use function\_score, but get exception:  
nested: PropertyAccessException[[Error: could not access: offer; in class:  
org.elasticsearch.search.lookup.DocLookup]\n[Near : {...  
doc[offer.price].value ....}  
"offer" is the child's index type.  
Please some one know that, help me, 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/63c50d63-05ee-4692-b85a-139dab506ead%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/63c50d63-05ee-4692-b85a-139dab506ead%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:21am UTC](https://discuss.elastic.co/t/can-i-sort-has-child-query-result-by-childs-numeric-field/18173/2 "2017-07-06T01:21:37Z")

</div>


