I'm a new in elastic search and I'm not sure how to define a geo_point type if I add data to an existing index from a diferent source.
If I create a new index everything works:
My logstash geo.conf file:
input {
file {
path => "/geoList.csv"
sincedb_path => "/dev/null"
start_position => "beginning"
}
}
filter {
csv {
separator => ";"
columns => [ "Country","LATITUDE","LONGITUDE"]
}
mutate {
convert => { "LATITUDE" => "float" }
convert => { "LONGITUDE" => "float" }
}
mutate {
rename => {
"LONGITUDE" => "[location][lon]"
"LATITUDE" => "[location][lat]"
}
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
index => 'geomap'
}
}
after that I create a template for my new index
PUT _template/geo_template
{
"template": "geomap",
"mappings": {
"logs" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}
}
And I can create a map and I have
location geo_point
But if I try to use geo.conf to add to my existing index
elasticsearch {
index => 'existingindex'
}
In the existing index I have 2 fields now:
location.lat number
location.lon number
but I need to have a one field to create a map visualisation:
location geo_point
I cannot get this field. I think the problem is that I need to to add mapping or a template but I don't know how to edit existing one from the existing index