# Stored fields for which types?

**URL:** <https://discuss.elastic.co/t/stored-fields-for-which-types/137641>\
**Category:** Elasticsearch\
**Created:** [June 27, 2018, 2:12pm UTC](https://discuss.elastic.co/t/stored-fields-for-which-types/137641 "2018-06-27T14:12:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cabane77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cabane77/32/20414_2.png) [@cabane77](https://discuss.elastic.co/u/cabane77)\
**Post date:** [June 27, 2018, 2:12pm UTC](https://discuss.elastic.co/t/stored-fields-for-which-types/137641/1 "2018-06-27T14:12:40Z")

</div>

Hi,  
With regards to stored fields in elasticsearch ([https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html)), does anyone has more documentation or info about which field types these stored fields can be tied to?

For e.g. how would it work for field types 'object' or 'json' ??? it's failing for me on 'object' type.

Any advice/thoughts would be most welcome

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [June 27, 2018, 7:13pm UTC](https://discuss.elastic.co/t/stored-fields-for-which-types/137641/2 "2018-06-27T19:13:28Z")

</div>

Stored fields can be applied to any concrete, non-object/non-complex types. So `keyword`, `text`, the numerics, IP, dates, etc.

I don't believe it works for `nested`, `object` or `geo_point`/`geo_shape`. Basically, any of the complex types that are actually composed of sub-types won't work.

I'm not sure if this is documented anywhere unfortunately. We should fix that 🙂

---

<div class="post-metadata">

**Author:** ![cabane77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cabane77/32/20414_2.png) [@cabane77](https://discuss.elastic.co/u/cabane77)\
**Post date:** [July 12, 2018, 7:26am UTC](https://discuss.elastic.co/t/stored-fields-for-which-types/137641/3 "2018-07-12T07:26:03Z")

</div>

thanks Zach for the reply.....what you state does make sense, but I would have expected this to be more explicit in the documentation, as in, stored fields don't apply to certain types; as it's been very much a trial and error for me and even wondering if I was doing something wrong in my code or buggy version of ES.

---

<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:** [August 9, 2018, 7:26am UTC](https://discuss.elastic.co/t/stored-fields-for-which-types/137641/4 "2018-08-09T07:26:14Z")

</div>

Closed on August 9, 2018, 7:26am UTC

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