# Nested field score problem

**URL:** <https://discuss.elastic.co/t/nested-field-score-problem/112759>\
**Category:** Elasticsearch\
**Created:** [December 21, 2017, 7:20am UTC](https://discuss.elastic.co/t/nested-field-score-problem/112759 "2017-12-21T07:20:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HilalB](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@HilalB](https://discuss.elastic.co/u/HilalB)\
**Post date:** [December 21, 2017, 7:20am UTC](https://discuss.elastic.co/t/nested-field-score-problem/112759/1 "2017-12-21T07:20:23Z")

</div>

I have an index:  
PUT my\_index2  
{  
"mappings": {  
"my\_type": {  
"properties": {  
"user": {  
"type": "nested"  
}  
}  
}  
}  
}

I added :  
POST my\_index2/my\_type/  
{  
"user" : [  
{  
"name" : "Alice Don"  
},{  
"name" : "Don Bark"  
}  
]  
}

and

POST my\_index2/my\_type/  
{  
"user" : [  
{  
"name" : "Alice School"  
}  
]  
}

When I search it:  
GET my\_index2/\_search  
{  
"query": {  
"nested" : {  
"path" : "user",  
"score\_mode" : "max",  
"query" : {  
"bool" : {  
"must" : [  
{ "match" : {"[user.name](http://user.name)" : "Alice"} }  
]  
}  
}  
}  
}  
}

The score of the first document one is higher but both has one "Alice" . How could that possible?

---

<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:** [January 18, 2018, 7:20am UTC](https://discuss.elastic.co/t/nested-field-score-problem/112759/2 "2018-01-18T07:20:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
