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
}
}
}
}
}
]