# How to disable indexing of unmapped fileds?

**URL:** <https://discuss.elastic.co/t/how-to-disable-indexing-of-unmapped-fileds/29521>\
**Category:** Elasticsearch\
**Created:** [September 17, 2015, 8:50pm UTC](https://discuss.elastic.co/t/how-to-disable-indexing-of-unmapped-fileds/29521 "2015-09-17T20:50:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![belaboros](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@belaboros](https://discuss.elastic.co/u/belaboros)\
**Post date:** [September 17, 2015, 8:50pm UTC](https://discuss.elastic.co/t/how-to-disable-indexing-of-unmapped-fileds/29521/1 "2015-09-17T20:50:00Z")

</div>

Can you help me?

I would like to use unmapped fields (ie documents may contain fields not mentioned in mapping), but there will be many and I dont want to index them. Also I will not search based on the unmapped fields.

How can I disable indexing of unmapped (dynamically added) fields?

_Thanks,_  
_Béla_

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [September 17, 2015, 9:16pm UTC](https://discuss.elastic.co/t/how-to-disable-indexing-of-unmapped-fileds/29521/2 "2015-09-17T21:16:21Z")

</div>

> [@belaboros](#):
>
> How can I disable indexing of unmapped (dynamically added) fields?

Have a look [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-dynamic-mapping.html). Basically you set `"dynamic": "false"`. There is also a `"dynamic": "strict"` to throw an error on unmapped fields if you want to do that at some point.

---

<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 5, 2017, 11:49pm UTC](https://discuss.elastic.co/t/how-to-disable-indexing-of-unmapped-fileds/29521/3 "2017-07-05T23:49:33Z")

</div>


