# How to "ignore" dynamic fields not matching any "dynamic\_templates"?

**URL:** <https://discuss.elastic.co/t/how-to-ignore-dynamic-fields-not-matching-any-dynamic-templates/19153>\
**Category:** Elasticsearch\
**Created:** [August 7, 2014, 8:14pm UTC](https://discuss.elastic.co/t/how-to-ignore-dynamic-fields-not-matching-any-dynamic-templates/19153 "2014-08-07T20:14:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drew\_Kutcharian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drew_kutcharian/32/742_2.png) [@Drew\_Kutcharian](https://discuss.elastic.co/u/Drew_Kutcharian)\
**Post date:** [August 7, 2014, 8:14pm UTC](https://discuss.elastic.co/t/how-to-ignore-dynamic-fields-not-matching-any-dynamic-templates/19153/1 "2014-08-07T20:14:33Z")

</div>

Hey Guys,

In my mapping, I set 'dynamic' to 'true' and I have a few 'dynamic\_templates' that based on the name of the fields map them to different types. How can I ignore and not index fields that don't match any of the templates? I tried adding an "ignoredFields" dynamic template like below to ignore the fields but it doesn't seem to be working and all undefined fields still get mapped.

{  
"ignored": {  
"match": "\*",  
"mapping": {  
"enabled": false  
}  
}  
}

Thanks,

Drew

--  
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/58182A69-1A91-4039-865A-F05EDBE22B89%40venarc.com](https://groups.google.com/d/msgid/elasticsearch/58182A69-1A91-4039-865A-F05EDBE22B89%40venarc.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, 1:10am UTC](https://discuss.elastic.co/t/how-to-ignore-dynamic-fields-not-matching-any-dynamic-templates/19153/2 "2017-07-06T01:10:07Z")

</div>


