# Can we index and store fields that is present only in the mapping?

**URL:** <https://discuss.elastic.co/t/can-we-index-and-store-fields-that-is-present-only-in-the-mapping/97722>\
**Category:** Elasticsearch\
**Created:** [August 21, 2017, 7:52am UTC](https://discuss.elastic.co/t/can-we-index-and-store-fields-that-is-present-only-in-the-mapping/97722 "2017-08-21T07:52:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navin720](https://avatars.discourse-cdn.com/v4/letter/n/9e8a1a/32.png) [@Navin720](https://discuss.elastic.co/u/Navin720)\
**Post date:** [August 21, 2017, 7:52am UTC](https://discuss.elastic.co/t/can-we-index-and-store-fields-that-is-present-only-in-the-mapping/97722/1 "2017-08-21T07:52:43Z")

</div>

I have a mapping which contains fields id, name and I index the document with fields id,name and age. Is it possible to limit only id and name and not age

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 21, 2017, 11:05am UTC](https://discuss.elastic.co/t/can-we-index-and-store-fields-that-is-present-only-in-the-mapping/97722/2 "2017-08-21T11:05:34Z")

</div>

You can configure dynamic field mapping to either ignore new fields (so they are not searchable) or even to reject a document that contains fields, which are not in the mapping. See

[https://www.elastic.co/guide/en/elasticsearch/reference/5.5/dynamic-field-mapping.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/dynamic-field-mapping.html)

---

<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:** [September 18, 2017, 11:06am UTC](https://discuss.elastic.co/t/can-we-index-and-store-fields-that-is-present-only-in-the-mapping/97722/3 "2017-09-18T11:06:09Z")

</div>

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