# Setting dynamic mapping to false for root but enable it for selected fields

**URL:** https://discuss.elastic.co/t/setting-dynamic-mapping-to-false-for-root-but-enable-it-for-selected-fields/21049
**Category:** Elasticsearch
**Created:** [December 3, 2014, 8:10am UTC](https://discuss.elastic.co/t/setting-dynamic-mapping-to-false-for-root-but-enable-it-for-selected-fields/21049 "2014-12-03T08:10:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)
#### Post date: [December 3, 2014, 8:10am UTC](https://discuss.elastic.co/t/setting-dynamic-mapping-to-false-for-root-but-enable-it-for-selected-fields/21049/1 "2014-12-03T08:10:24Z")

</div>

Hi all,

Currently, I am trying to index documents that have conflicting mapping.  
ElasticSearch cannot resolve that, so I am trying to reverse the indexing  
approach.

I have disabled dynamic mapping at the root, but I would like to explicitly  
provide the mapping for some fields or have the dynamic mapping set to true  
for some.

{  
"mappings": {  
"_default_": {  
"dynamic" : "false",  
"\_all" : {"enabled" : true},  
"properties" : {  
"#text" : { "type": "string",  
"dynamic" : "true"  
}  
}  
}  
}  
}

However, it still won't index in this case the #text field. Have I  
misunderstood how this feature works? Could someone please help me out?

Thanks!

/JZ

--  
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/f6633847-c089-4cf4-ad16-938ee058cd09%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f6633847-c089-4cf4-ad16-938ee058cd09%40googlegroups.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, 12:46am UTC](https://discuss.elastic.co/t/setting-dynamic-mapping-to-false-for-root-but-enable-it-for-selected-fields/21049/2 "2017-07-06T00:46:24Z")

</div>


