Kibana visualizations splitting fields with dashes in them with index name other than logstash-*


(mv) #1

I used the templates to get rid of the field name splitting ... It worked for the indices with the name logstash-*.
But i have a different name and hence it is not working
Is there any other solution.... I am using Kibana 4.1.5 , ElasticSearch-1.7.2, Logstash 2.1.2

my template is something like below
--where 'local1' is my index name and 'data.projectName' is my field name.
{
"template" : "local1",
"mappings" : {
"default" : {
"data": {
"properties":{
"projectName":{"type":"string", "index":"not_analyzed"},
}
}
}
}
}


Problem in Templates for Indices Named other than logstash-*
(Anh) #2

Can you pull the current mapping of your index by executing:

GET local1/_mapping

If you see split strings in your field data, it is most likely that the field is analyzed.


(mv) #3

Sorry, my template was wrong.... i got it when I used the below one

{
"template" : "local1",
"mappings" : {
"default" : {
"_all" : {"enabled" : true},
"dynamic_templates" : [ {
"string_fields" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : {
"type" : "string", "index" : "analyzed", "omit_norms" : true,
"fields" : {
"raw" : {"type": "string", "index" : "not_analyzed"}
}
}
}
} ]

}
}
}

this creates the .raw fields for all the strings fields.... :slight_smile:


(system) #4