Hi!
I am using the usual ELK stack with the default template (
http://pastebin.com/DtYiazVr
http://www.google.com/url?q=http%3A%2F%2Fpastebin.com%2FDtYiazVr&sa=D&sntz=1&usg=AFQjCNEIrorp9e9dSh98HTjQoPQoEor3Vg).
In every log message, the date in stored in field named "log_date", which
the date filter converts in a "@timestamp". I want to set the "log_date"
field as "not_analyzed" so that I can sort it in Kibana without getting
weird results.
I built the following query
curl -XPUT localhost:9200/_template/template_1 -d '
{
"template" : "logstash-*",
"properties" : {
"log_date" : {
"type" : "string",
"index" : "not_analyzed"
}
}
}
Can you confirm that the request is correct? I have doubts about the
template name. I thought about calling url
localhost:9200/_template/logstash in order to modify the existing template
rather than creating a new one, but I am afraid of what could happen the
day I restart logstash, so my thinking is that if all works as intended,
both logstash default template and that one will apply.
Also I believe that templates are only about future data. Is there any way
to retro apply it back on existing indexes?
Thanks for your help
Aldian
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1c7fe34e-7792-409d-83ab-3c39fe883e95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.