I have field called 'PrimaryAssembly' that I don't want broken into tokens.
For example, I don't want 'Allergy & Immunology' broken into 'Allergy' and 'Immunology'.
I want those words whole for when I create a pie chart.
I tried using a custom index template by referencing it in my logstash config as so:
output{
elasticsearch {
index=>"assemblies"
hosts => ["localhost:9200"]
template => "/home/ubuntu/templates/assemblies_template.json"
}
stdout {codec=>rubydebug}
}
I tried setting my fields to "not_analyzed", but this is not working.
When I create a pie chart, my legend is still using tokenized words, 'allergy' and 'immunology'.
In addition, my raw fields are not showing up in Kibana.
Here is a portion of my template:
{
"template" : "assemblies",
"settings" : {
"index.refresh_interval" : "5s"
},
"mappings" : {
"default" : {
"_all" : {"enabled" : true, "omit_norms" : true},
"dynamic_templates" : [ {
"message_field" : {
"match" : "message",
"match_mapping_type" : "string",
"mapping" : {
"type" : "string", "index" : "not_analyzed", "omit_norms" : true,
"fielddata" : { "format" : "disabled" }
}
}
}, {
"string_fields" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : {
"type" : "string", "index" : "not_analyzed", "omit_norms" : true,
"fielddata" : { "format" : "disabled" },
"fields" : {
"raw" : {"type": "string", "index" : "not_analyzed", "doc_values" : true, "ignore_above" : 256}
}
}
}
}