I'm trying to convert latitude and longitude to geo_point location in order to use it a map visulaztion.
this is my configuration:
input{
file{
path=>"C:\Users\Ahmed\Desktop\311_Service_Requests_from_2015.csv"
start_position=>"beginning"
sincedb_path=>NUL
}
}
filter{
csv{
separator=>","
columns=>["Unique Key","Created Date","Closed Date","Agency","Agency Name","Complaint Type","Descriptor","Location Type","Incident Zip","Incident Address","Street Name","Cross Street 1","Cross Street 2","Intersection Street 1","Intersection Street 2","Address Type","City","Landmark","Facility Type","Status","Due Date"," Resolution Description","Resolution Action Updated Date","Community Board","Borough","X Coordinate (State Plane)","Y Coordinate (State Plane)","Park Facility Name","Park Borough","School Name","School Number","School Region","School Code","School Phone Number", "School Address","School City","School State","School Zip","School Not Found","School or Citywide Complaint","Vehicle Type","Taxi Company Borough","Taxi Pick Up Location","Bridge Highway Name","Bridge Highway Direction","Road Ramp","Bridge Highway Segment","Garage Lot Name","Ferry Direction","Ferry Terminal Name","Latitude","Longitude","Location"]
}
mutate{
convert=>["Latitude","float"]
convert=>["Longitude","float"]
rename=>["Latitude","[location][lat]"]
rename=>["Longitude","[location][lon]"]
}
date{
match=>["Created Date","MM/dd/yyyy HH:mm:ss aa"]
target=>"Date"
}
}
output{
elasticsearch {
hosts=> "localhost"
index=> "nyc311calls7"
document_type=>"calls"
}
stdout{codec=>rubydebug}
}
i see in a youtube that i need t o add this template before creating the index pattern:
put _template/nyc*311*7
{
"order":0,
"index_patterns":"nyc*311*7",
"mapping":{
"_default":{
"properties":{
"location ":{
"type":"geo_point"
}
}
}
}
}
but that dosen't convert the location to a geo_point, what i am doing wrong ?