I am trying to load the geo location data, using a single field.
How can I dis using a single location field with comma separated lat, lon.
example
location
-40.345, 23.993
-45.345, 23.945
-20.345, 23.993
Here is the mapping I used:
curl -XPOST http://localhost:9200/ats_member_locations -d '{"mappings":{"ats_locations":{"properties":{"latitude":{"type":"geo_point"}, "longitude":{"type":"geo_point"}}}}}'
Here is my config:
input{
file{
path => "/home/ubuntu/torched_products_addresses_work.csv"
type => "ats_locations"
start_position => "beginning"
sincedb_path =>"/dev/null/"
}
}
filter{
csv{
columns =>["location"]
separator=>","
}
mutate {
rename => [ "location", "[location][lat],[location][lon]" ]
}
}
output{
elasticsearch {
index=>"ats_member_locations"
hosts => ["localhost:9200"]
}
stdout { codec => rubydebug }
}