# \`store\`'d fields w/ \`index\_name\` in mapping loaded using \`fields\` returned in \`hits\` objects keyed by \`index\_name\`?

**URL:** <https://discuss.elastic.co/t/store-d-fields-w-index-name-in-mapping-loaded-using-fields-returned-in-hits-objects-keyed-by-index-name/21564>\
**Category:** Elasticsearch\
**Created:** [January 9, 2015, 7:34pm UTC](https://discuss.elastic.co/t/store-d-fields-w-index-name-in-mapping-loaded-using-fields-returned-in-hits-objects-keyed-by-index-name/21564 "2015-01-09T19:34:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luke\_Nezda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luke_nezda/32/47152_2.png) [@Luke\_Nezda](https://discuss.elastic.co/u/Luke_Nezda)\
**Post date:** [January 9, 2015, 7:34pm UTC](https://discuss.elastic.co/t/store-d-fields-w-index-name-in-mapping-loaded-using-fields-returned-in-hits-objects-keyed-by-index-name/21564/1 "2015-01-09T19:34:15Z")

</div>

In attempting to work around  
[https://github.com/elasticsearch/elasticsearch/issues/5851](https://github.com/elasticsearch/elasticsearch/issues/5851), I found  
that `store`'d fields with `index_name` in their mapping loaded using `fields <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-fields.html>`  
are returned in `hits` objects keyed by their `index_name` (e.g.,  
"name\_string", not "name" in this example). Here is a gist demonstrating  
this: [https://gist.github.com/nezda/6a360d44927d275178a9](https://gist.github.com/nezda/6a360d44927d275178a9)

This seems like a bug to me to expose this mapping "implementation detail".  
If it is intentional, maybe it could be disabled with a parameter on the  
`fields` loader?

(Tested with es 1.4.2)

Please advise,

- Luke

--  
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/ce90f059-76d6-4997-a112-3cf5d45f542f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ce90f059-76d6-4997-a112-3cf5d45f542f%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, 12:39am UTC](https://discuss.elastic.co/t/store-d-fields-w-index-name-in-mapping-loaded-using-fields-returned-in-hits-objects-keyed-by-index-name/21564/2 "2017-07-06T00:39:47Z")

</div>


