# Template is not being used, mapping not working

**URL:** <https://discuss.elastic.co/t/template-is-not-being-used-mapping-not-working/190207>\
**Category:** Elasticsearch\
**Created:** [July 12, 2019, 10:15am UTC](https://discuss.elastic.co/t/template-is-not-being-used-mapping-not-working/190207 "2019-07-12T10:15:40Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![mpes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mpes/32/49982_2.png) [@mpes](https://discuss.elastic.co/u/mpes)\
**Post date:** [July 13, 2019, 7:11pm UTC](https://discuss.elastic.co/t/template-is-not-being-used-mapping-not-working/190207/9 "2019-07-13T19:11:27Z")

</div>

So. What I just tried was creating the index template in Kibana.

```auto
PUT _template/beam_custom
/followed by what is in my template.json

```

I then checked if the template was created.

```auto
GET _template/beam_custom

```

The output was this:

```auto
    {
      "beam_custom": {
        "order": 100,
        "template": "beam_custom",
        "settings": {
          "index": {
            "analysis": {
              "analyzer": {
                "custom_path_tree_reversed": {
                  "tokenizer": "custom_hierarchy_reversed"
                },
                "custom_path_tree": {
                  "tokenizer": "custom_hierarchy"
                }
              },
              "tokenizer": {
                "custom_hierarchy": {
                  "type": "path_hierarchy",
                  "delimiter": "/"
                },
        ...

```

So I guess creating the template worked.

Then I created an index

```auto
    PUT beam-2019-07-15

```

But when I checked the index, I got this:

```auto
    {
  "beam-2019.07.15": {
    "aliases": {},
    "mappings": {},
    "settings": {
      "index": {
        "creation_date": "1563044670605",
        "number_of_shards": "5",
        "number_of_replicas": "1",
        "uuid": "rGzplctSQDmrI_NSlt47hQ",
        "version": {
          "created": "5061699"
        },
        "provided_name": "beam-2019.07.15"
      }
    }
  }
}

```

Shouldn't the index pattern have been recognized? I think this is the heart of the problem. I thought that my template would have been used and the output should have been something like this instead:

```auto
{
  "beam-2019.07.15": {
    "aliases": {},
    "mappings": {
      "logs": {
        "properties": {
          "@timestamp": {
            "type": "date"
          },
          "action": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword"
              }
            }
          },...

```

Why doesn't it recognize the pattern?

---

_[View the full topic](https://discuss.elastic.co/t/template-is-not-being-used-mapping-not-working/190207)._
