# Elasticsearch 6 beta 1 - correct way to create a default template

**URL:** https://discuss.elastic.co/t/elasticsearch-6-beta-1-correct-way-to-create-a-default-template/98483
**Category:** Elasticsearch
**Created:** [August 27, 2017, 4:42pm UTC](https://discuss.elastic.co/t/elasticsearch-6-beta-1-correct-way-to-create-a-default-template/98483 "2017-08-27T16:42:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![randude](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/randude/32/34911_2.png) [@randude](https://discuss.elastic.co/u/randude)
#### Post date: [August 27, 2017, 4:42pm UTC](https://discuss.elastic.co/t/elasticsearch-6-beta-1-correct-way-to-create-a-default-template/98483/1 "2017-08-27T16:42:34Z")

</div>

Hi,  
So in the new docs I see that the _default_ (with underscores before and after) mapping is deprecated or at least it should be since there can be only one doc type anyways.

However, when I done define a logstash template to use when sending outputs to elasticsearch, I see it installs a default template under logstash-\*. It uses the _default_ setting:

"mappings": {  
" **default**": {  
"dynamic\_templates": [  
{...

So, what is the correct syntax to define a custom template?

---

<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: [September 24, 2017, 4:43pm UTC](https://discuss.elastic.co/t/elasticsearch-6-beta-1-correct-way-to-create-a-default-template/98483/2 "2017-09-24T16:43:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
