Geoip: How to map any index to a template?

Hello.
I'm trying to "convert" the geoip.location field from a number to a "geo_point".
My index from my test servers is called "test".

When I get this to work, I need to map index: "prod" to the same template.

My template look like this:
# curl -XGET 'localhost:9200/_template?pretty' { "logstash" : { "order" : 0, "version" : 50001, "template" : "logstash-*", "settings" : { "index" : { "refresh_interval" : "5s" } }, "mappings" : { "_default_" : { "dynamic_templates" : [ { "message_field" : { "path_match" : "message", "mapping" : { "norms" : false, "type" : "text" }, "match_mapping_type" : "string" } }, { "string_fields" : { "mapping" : { "norms" : false, "type" : "text", "fields" : { "keyword" : { "type" : "keyword" } } }, "match_mapping_type" : "string", "match" : "*" } } ], "_all" : { "norms" : false, "enabled" : true }, "properties" : { "@timestamp" : { "include_in_all" : false, "type" : "date" }, "geoip" : { "dynamic" : true, "properties" : { "ip" : { "type" : "ip" }, "latitude" : { "type" : "half_float" }, "location" : { "type" : "geo_point" }, "longitude" : { "type" : "half_float" } } }, "@version" : { "include_in_all" : false, "type" : "keyword" } } } }, "aliases" : { } } }

Fixed it by creating two new complete copies of the "logstash" template called "test" and "prod".

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.