Don't tell me nobody here ever made such a simple request? On Thursday, January 22, 2015 at 11:57:26 AM UTC+1, Aldian wrote: > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2de42363-b3a8-4561-bda8-b844d4c287a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
