# Check whether a field has mapping store=true

**URL:** <https://discuss.elastic.co/t/check-whether-a-field-has-mapping-store-true/264792>\
**Category:** Elasticsearch\
**Created:** [February 19, 2021, 5:51am UTC](https://discuss.elastic.co/t/check-whether-a-field-has-mapping-store-true/264792 "2021-02-19T05:51:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nishikant\_Tayade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nishikant_tayade/32/84159_2.png) [@Nishikant\_Tayade](https://discuss.elastic.co/u/Nishikant_Tayade)\
**Post date:** [February 19, 2021, 5:51am UTC](https://discuss.elastic.co/t/check-whether-a-field-has-mapping-store-true/264792/1 "2021-02-19T05:51:15Z")

</div>

I am trying out the following use case:

I want only the fields from index template, or index mapping, for which mapping property store=true,  
though I can get the mapping and parse it and check for the criteria or can use get mapping for a particular field, but the first once is not feasible and the for later I need to specify the field name in advanced, also it returns the whole mapping for field, where I need only store.

Any help is much appreciated!! Thanks:)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 22, 2021, 5:20am UTC](https://discuss.elastic.co/t/check-whether-a-field-has-mapping-store-true/264792/2 "2021-02-22T05:20:18Z")

</div>

Welcome to our community! 😃

There's no way to query `_mapping` for a specific field type. You need to get the whole thing and parse it.

---

<div class="post-metadata">

**Author:** ![Nishikant\_Tayade](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nishikant_tayade/32/84159_2.png) [@Nishikant\_Tayade](https://discuss.elastic.co/u/Nishikant_Tayade)\
**Post date:** [March 12, 2021, 8:15am UTC](https://discuss.elastic.co/t/check-whether-a-field-has-mapping-store-true/264792/3 "2021-03-12T08:15:42Z")

</div>

Thanks Mark!!

---

<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:** [April 9, 2021, 8:16am UTC](https://discuss.elastic.co/t/check-whether-a-field-has-mapping-store-true/264792/4 "2021-04-09T08:16:15Z")

</div>

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