# Elasticsearch Template from JSON file

**URL:** <https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356>\
**Category:** Elasticsearch\
**Created:** [October 6, 2016, 9:16am UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356 "2016-10-06T09:16:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [October 6, 2016, 9:16am UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356/1 "2016-10-06T09:16:51Z")

</div>

Hi,

I'm using **Elasticsearch-2.3.4** in windows server machine and trying import global template (for all index) from "default-template.json" file instead of using XPUT .

I've placed the file "default-template.json" file in ..\config\templates folder and restarted elasticsearch service but on indexing new documents (dynamic mapping) **I'm not able to see any impact of global template defined**.

Below is the content of "default-template.json" file,

{  
"\_template" :  
{  
"template" : "_",  
"settings":{  
"index":{  
"analysis":{  
"analyzer":{  
"analyzer\_keyword":{  
"tokenizer":"keyword",  
"filter":"lowercase"  
}  
}  
}  
}  
},  
"mappings": {  
"default": {  
"numeric\_detection": true,  
"dynamic\_templates": [  
{  
"string\_analyzer": {  
"match\_mapping\_type": "string",  
"match": "_",  
"mapping": {  
"type": "string",  
"analyzer":"analyzer\_keyword"  
}  
}  
}  
]  
}  
}  
}  
}

**Am I missing something ?**

Regards  
Sreeram

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 7, 2016, 3:20am UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356/2 "2016-10-07T03:20:19Z")

</div>

Yep, see [https://www.elastic.co/guide/en/elasticsearch/reference/2.3/breaking\_20\_mapping\_changes.html#\_mappings\_in\_config\_files\_not\_supported](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/breaking_20_mapping_changes.html#_mappings_in_config_files_not_supported)

---

<div class="post-metadata">

**Author:** ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)\
**Post date:** [October 7, 2016, 7:36am UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356/3 "2016-10-07T07:36:06Z")

</div>

See  
[https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking\_20\_index\_api\_changes.html#\_file\_based\_index\_templates](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking_20_index_api_changes.html#_file_based_index_templates)

---

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [October 9, 2016, 1:34pm UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356/4 "2016-10-09T13:34:43Z")

</div>

Got it, Thanks 🙂

---

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [October 9, 2016, 1:35pm UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356/5 "2016-10-09T13:35:14Z")

</div>

Thanks 🙂

---

<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, 10:13pm UTC](https://discuss.elastic.co/t/elasticsearch-template-from-json-file/62356/6 "2017-07-05T22:13:45Z")

</div>


