# How to validated index templates

**URL:** <https://discuss.elastic.co/t/how-to-validated-index-templates/192313>\
**Category:** Elasticsearch\
**Created:** [July 25, 2019, 7:49pm UTC](https://discuss.elastic.co/t/how-to-validated-index-templates/192313 "2019-07-25T19:49:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TeraInferno](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/terainferno/32/40302_2.png) [@TeraInferno](https://discuss.elastic.co/u/TeraInferno)\
**Post date:** [July 25, 2019, 7:49pm UTC](https://discuss.elastic.co/t/how-to-validated-index-templates/192313/1 "2019-07-25T19:49:43Z")

</div>

Hello,

I am trying to use multiple index templates in elasticsearch and need to verify that the final index template, after they are merged together by elasticsearch, is what I was aiming for. For example, if I add the following templates:

```
PUT /_template/red-base
{
  "index_patterns": [
    "red-*"
  ],
  "order": 25,
  "settings": {
    "analysis": {
      "normalizer": {
        "lowerascii": {
          "type": "custom",
          "char_filter": [],
          "filter": [
            "lowercase",
            "asciifolding"
          ]
        }
      },
      "analyzer": {
        "autocomplete": {
          "filter": [
            "lowercase"
          ],
          "tokenizer": "autocomplete"
        },
        "autocomplete_search": {
          "tokenizer": "lowercase"
        }
      },
      "tokenizer": {
        "autocomplete": {
          "max_gram": 10,
          "min_gram": 2,
          "token_chars": [
            "letter",
            "digit",
            "symbol"
          ],
          "type": "edge_ngram"
        }
      }
    }
  },
  "mappings": {
    "_default_": {
      "_size": {
        "enabled": "true"
      },
      "dynamic_templates": [
        {
          "string_fields": {
            "match_mapping_type": "string",
            "mapping": {
              "fields": {
                "raw": {
                  "type": "text"
                },
                "original": {
                  "type": "keyword"
                }
              },
              "type": "keyword",
              "normalizer": "lowerascii",
              "analyzer": "autocomplete",
              "search_analyzer": "autocomplete_search"
            }
          }
        }
      ]
    }
  },
  "aliases": {}
}
PUT /_template/red-networkinfo
{
  "index_patterns": [
    "red-networkinfo*"
  ],
  "order": 250,
  "mappings": {
    "_default_": {
      "properties": {
        "realip": {
          "type": "ip"
        }
      }
    }
  }
}

```

How can I determine what the final, combined index template for a 'red-networkinfo-01' index is?

---

<div class="post-metadata">

**Author:** ![gabriel\_tessier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabriel_tessier/32/27911_2.png) [@gabriel\_tessier](https://discuss.elastic.co/u/gabriel_tessier)\
**Post date:** [July 26, 2019, 12:05am UTC](https://discuss.elastic.co/t/how-to-validated-index-templates/192313/2 "2019-07-26T00:05:28Z")

</div>

Hi @TeraInferno

You can easily test by adding a document in a red-networkinfo-01 index with a string field and a field realip with an IP value inside.

```
POST red-networkinfo-01/doc/1
{
   "foo": "bar",
   "realip": "172.0.0.1"
}

```

Ten you can confirm by checking the mapping.

```
GET red-networkinfo-01/doc/_mapping

```

it will return the defined mapping.

---

<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:** [August 23, 2019, 12:05am UTC](https://discuss.elastic.co/t/how-to-validated-index-templates/192313/3 "2019-08-23T00:05:33Z")

</div>

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