# ES 2.4 Index Template Problem need a little help figuring it out!

**URL:** https://discuss.elastic.co/t/es-2-4-index-template-problem-need-a-little-help-figuring-it-out/61639
**Category:** Elasticsearch
**Created:** [September 27, 2016, 7:04pm UTC](https://discuss.elastic.co/t/es-2-4-index-template-problem-need-a-little-help-figuring-it-out/61639 "2016-09-27T19:04:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gh0stid](https://avatars.discourse-cdn.com/v4/letter/g/f9ae1b/32.png) [@gh0stid](https://discuss.elastic.co/u/gh0stid)
#### Post date: [September 27, 2016, 7:04pm UTC](https://discuss.elastic.co/t/es-2-4-index-template-problem-need-a-little-help-figuring-it-out/61639/1 "2016-09-27T19:04:20Z")

</div>

Hello all,

Stupid problem over here im sure... i just cant place the finger on it... If you could point me to the problem it would be greatly apreciated.

heres the template :

```
curl -XPUT 'http://localhost:9200/_template/ftg' -d '
{
  "order" : 0,
  "template": "ftg-*",
  "settings" : {
    "index.refresh_interval" : "5s"
    "index.number_of_replicas" : 0
    "index.codec" : "best_compression"
    "number_of_shards" : 5
        }
  },
  "mappings" : {
    "_default_" : {
       "_all" : { "enabled" : false },
       "dynamic_templates" : [ {
         "message_field" : {
           "match" : "message",
           "match_mapping_type" : "string",
           "mapping" : {
             "type" : "string", "index" : "analyzed", "omit_norms" : true,
             "fields" : {
              "raw" : {"type": "string", "index" : "not_analyzed", "ignore_above" : 256}
             }
           }
         }
       }, {
         "string_fields" : {
           "match" : "*",
           "match_mapping_type" : "string",
           "mapping" : {
             "type" : "string", "index" : "analyzed", "omit_norms" : true,
               "fields" : {
                 "raw" : {"type": "string", "index" : "not_analyzed", "ignore_above" : 256}
               }
           }
         }
       } ],
"properties" : {
         "@version": { "type": "string", "index": "not_analyzed" },
         "geoip" : {
           "type" : "object",
             "dynamic": true,
             "properties" : {
               "location" : { "type" : "geo_point" }
             }
         }
       }
    }
  }
}'

```

im sure the problem is pretty dumb, but I keep getting error code 34, execting a comma... Cant find where.

please pretty please ?

thank you

---

<div class="post-metadata">

### Author: ![johtani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johtani/32/44956_2.png) [@johtani](https://discuss.elastic.co/u/johtani)
#### Post date: [September 27, 2016, 8:55pm UTC](https://discuss.elastic.co/t/es-2-4-index-template-problem-need-a-little-help-figuring-it-out/61639/2 "2016-09-27T20:55:23Z")

</div>

Hi,

There is one end brace too many for settings.  
And commas are necessary for the end of each lines except the last line in settings.

---

<div class="post-metadata">

### Author: ![gh0stid](https://avatars.discourse-cdn.com/v4/letter/g/f9ae1b/32.png) [@gh0stid](https://discuss.elastic.co/u/gh0stid)
#### Post date: [September 28, 2016, 1:50pm UTC](https://discuss.elastic.co/t/es-2-4-index-template-problem-need-a-little-help-figuring-it-out/61639/3 "2016-09-28T13:50:07Z")

</div>

awesome.... so stupid of me

unfortunately still have another question. an easy one, again

im trying to use a index template, as you noticed..., stilllll even if the template gets used, ( in term of setting and such ) it doesnt work with the "type"

in my logstash file ive setup it to be type "FTG" yet, apparentely the log it self have a "field" that I cant drop. that push the type for the logs.. "event" "traffic" "utm"

How would someone be able to make em all "ftg" ?

Not sure if im clear enought, sorry for that :\

---

<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: [July 5, 2017, 10:16pm UTC](https://discuss.elastic.co/t/es-2-4-index-template-problem-need-a-little-help-figuring-it-out/61639/4 "2017-07-05T22:16:38Z")

</div>


