# Functionality of "template" field on templates?

**URL:** <https://discuss.elastic.co/t/functionality-of-template-field-on-templates/111808>\
**Category:** Beats\
**Created:** [December 14, 2017, 4:11pm UTC](https://discuss.elastic.co/t/functionality-of-template-field-on-templates/111808 "2017-12-14T16:11:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caladbolgll](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@Caladbolgll](https://discuss.elastic.co/u/Caladbolgll)\
**Post date:** [December 14, 2017, 4:11pm UTC](https://discuss.elastic.co/t/functionality-of-template-field-on-templates/111808/1 "2017-12-14T16:11:39Z")

</div>

When setting up the basic beats system, there are default templates given in the package named as ` ___beat.template.json` or `___ beat.template-es6x.json` (which apparently seem to be identical) (fill `___` with one of the beat's name). When I look at them, all of them end with a `"template"` parameter:

```
"template": "___beat-*"

```

When I search them, they just appear as one of the top-level field of the template (url obfuscated for confidentiality):

```
curl https://id:pw@some.elasticsearch.com:ppppp/_template?pretty=true
{
   ...
  "filebeat_test": {
    "order": 0,
    "template": "filebeat-*",
    ...
  }
}

```

I'd like to know what this `"template"` field is used for, since it neither defines the name of the template nor seems to work as an index.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [December 17, 2017, 10:44am UTC](https://discuss.elastic.co/t/functionality-of-template-field-on-templates/111808/2 "2017-12-17T10:44:23Z")

</div>

This should solve your questions: [https://www.elastic.co/guide/en/elasticsearch/reference/5.6/indices-templates.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/indices-templates.html)

Be aware that the setting was renamed in ES 6 to `index_patterns`.

---

<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:** [January 4, 2018, 4:12pm UTC](https://discuss.elastic.co/t/functionality-of-template-field-on-templates/111808/3 "2018-01-04T16:12:12Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
