# Scoring on Child Documents

**URL:** https://discuss.elastic.co/t/scoring-on-child-documents/5494
**Category:** Elasticsearch
**Created:** [September 30, 2011, 8:19pm UTC](https://discuss.elastic.co/t/scoring-on-child-documents/5494 "2011-09-30T20:19:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kikster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kikster/32/3117_2.png) [@kikster](https://discuss.elastic.co/u/kikster)
#### Post date: [September 30, 2011, 8:19pm UTC](https://discuss.elastic.co/t/scoring-on-child-documents/5494/1 "2011-09-30T20:19:33Z")

</div>

I have an interesting scoring problem:

I have a parent and child document with these mappings, using this  
query:

> <https://gist.github.com/cdolivares/1254824>

I would like to score the parent documents based on the value in  
"points" field in the child document. Is this possible? I know in  
elasticsearch I can specify a field boost, but this is not exactly  
what I need because I do not want to boost the whole document because  
a field simply matches. Instead, I want to score the document based on  
the value of a field inside a child document that a fuzzy like this  
query matches.

I've tried to do this using a custom script where I pass in the query  
string a user enters (in the gist it would be "Finance"), but the  
problem is I cannot easily determine exactly which child document the  
flt matched (since flt expands the set of query strings, and the  
string that ultimately matches a child document may not be an exact  
string or sub-string match).

---

<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, 3:53am UTC](https://discuss.elastic.co/t/scoring-on-child-documents/5494/2 "2017-07-06T03:53:13Z")

</div>


