# What is mapping type in index template?

**URL:** https://discuss.elastic.co/t/what-is-mapping-type-in-index-template/108057
**Category:** Elasticsearch
**Created:** [November 17, 2017, 4:53am UTC](https://discuss.elastic.co/t/what-is-mapping-type-in-index-template/108057 "2017-11-17T04:53:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)
#### Post date: [November 17, 2017, 4:53am UTC](https://discuss.elastic.co/t/what-is-mapping-type-in-index-template/108057/1 "2017-11-17T04:53:48Z")

</div>

Hi,

I am using Elaasticsearch GA 5.0.0. I am tring to apply index template, and from [this link](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/indices-templates.html) I was able to get a tutorial with examples. Below is the sample template defined there.

```
PUT _template/template_1
{
  "template": "te*",
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "type1": {
      "_source": {
        "enabled": false
      },
      "properties": {
        "host_name": {
          "type": "keyword"
        },
        "created_at": {
          "type": "date",
          "format": "EEE MMM dd HH:mm:ss Z YYYY"
        }
      }
    }
  }
}

```

I would like to know what `type1` defined there. Is this something like a name for grouping or has some relation with the index? Can I give it any name?

Thanks.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 17, 2017, 6:01am UTC](https://discuss.elastic.co/t/what-is-mapping-type-in-index-template/108057/2 "2017-11-17T06:01:13Z")

</div>

When you index a document you do:

```
PUT index/type/id 

```

So type is part of the document coordinates.

But starting from 6.0, you can use only one type per index.  
And types are going to be removed in 7.0/8.0

---

<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: [December 15, 2017, 6:01am UTC](https://discuss.elastic.co/t/what-is-mapping-type-in-index-template/108057/3 "2017-12-15T06:01:23Z")

</div>

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