Problem with getting raw fields

If I comment out the index name in my logstash config, I can get my fields as not analyzed.
If I try to include the index name, my fields are all analyzed.

Why?

Here are my config files.

Logstash:

input {
  jdbc {
 xxxxxxxxxxx
}

output{

        elasticsearch {
                #index=>"member_type_history-%{+YYYY.MM.dd}"
                hosts => ["localhost:9200"]
                template => "/home/ubuntu/template/member_type_history_template.json"
                template_name => "ats_member_type_history_template"
                template_overwrite => true
                manage_template => false

        }

#stdout { codec => rubydebug }
}

Here is my template:

"dynamic_templates": [
{
"ats_member_type_history_template": {
"match_mapping_type": "string",
"match": "*",
"mapping": {
"type": "string",
"fields": {
"raw": {
"type": "string",
"index": "not_analyzed",
"ignore_above": 256
}
}
}
}
}
]

I figured it out.
I actually DID have to put the template into Elasticsearch first.
I was trying to reference the JSON template in the logstash config, to no avail.

Here is what works, I put this into sense:

PUT /_template/xxx_member_type_history_template
{
  "template": "member_type_history-*",
  "order": 1,
  "mappings": {
    "xxx_member_type_history":{
      "properties": {
        "member type":{
          "type": "string","index": "not_analyzed"
        }
      }
    }
  }
}