# How to add not analyzed field with dynamic tempate?

**URL:** <https://discuss.elastic.co/t/how-to-add-not-analyzed-field-with-dynamic-tempate/31391>\
**Category:** Elasticsearch\
**Created:** [September 30, 2015, 9:27am UTC](https://discuss.elastic.co/t/how-to-add-not-analyzed-field-with-dynamic-tempate/31391 "2015-09-30T09:27:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![no\_jihun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/no_jihun/32/64028_2.png) [@no\_jihun](https://discuss.elastic.co/u/no_jihun)\
**Post date:** [October 1, 2015, 1:03am UTC](https://discuss.elastic.co/t/how-to-add-not-analyzed-field-with-dynamic-tempate/31391/3 "2015-10-01T01:03:55Z")

</div>

here is my setting.

PUT /\_template/default\_template  
{  
"template": "logstash-_",  
"settings": {  
"index.number\_of\_replicas": "1",  
"index.number\_of\_shards": "5"  
},  
"mappings": {  
"default": {  
"dynamic\_templates": [  
{  
"string\_match": {  
"mapping": {  
"index": "not\_analyzed",  
"doc\_values": true,  
"type": "string"  
},  
"match": "_",  
"match\_mapping\_type": "string"  
}  
},  
{  
"other": {  
"mapping": {  
"doc\_values": true  
},  
"match": "_",  
"match\_mapping\_type": "_"  
}  
}  
],  
"\_all": {  
"enabled": false  
}  
}  
},  
"aliases": {}  
}

---

_[View the full topic](https://discuss.elastic.co/t/how-to-add-not-analyzed-field-with-dynamic-tempate/31391)._
