# Multi\_field "just\_name" behavior with nested docs

**URL:** <https://discuss.elastic.co/t/multi-field-just-name-behavior-with-nested-docs/14182>\
**Category:** Elasticsearch\
**Created:** [October 31, 2013, 2:35am UTC](https://discuss.elastic.co/t/multi-field-just-name-behavior-with-nested-docs/14182 "2013-10-31T02:35:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Treher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_treher/32/45243_2.png) [@Justin\_Treher](https://discuss.elastic.co/u/Justin_Treher)\
**Post date:** [October 31, 2013, 2:35am UTC](https://discuss.elastic.co/t/multi-field-just-name-behavior-with-nested-docs/14182/1 "2013-10-31T02:35:13Z")

</div>

Do you think this behavior is intentional? I have a standard object and a  
nested object that both share the name key. I was under the impression that  
since "categories" is setup as nested object, it would be out of conflict  
with "sales\_person.". However, all my sales\_person.name values are being  
analyzed with the categories.name analyzer (default keyword). Name\_test is  
indexed correctly and searches work correctly. You can see that the mapping  
is identical for name and name\_test.

mappings:  
"sales\_person":{  
"type":"object",  
"properties":{  
"name":{  
"type":"multi\_field",  
"path":"just\_name",  
"fields":{  
"name":{  
"type":"string",  
"analyzer":"id\_keyword",  
},  
"name\_test":{  
"type":"string",  
"analyzer":"id\_keyword",  
}  
}  
}  
}  
}  
},  
"categories":{  
"type":"nested"  
,"properties":{  
"name":{  
"type":"multi\_field"  
,"path":"just\_name"  
,"fields":{  
"name":{  
"type":"string",  
"analyzer":"keyword"  
}  
}  
}  
}

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:09am UTC](https://discuss.elastic.co/t/multi-field-just-name-behavior-with-nested-docs/14182/2 "2017-07-06T02:09:41Z")

</div>

Closed on July 6, 2017, 2:09am UTC


