How to create geo point from separate lat, lon fields in csv

Hello,
I have a csv file that has two separate fields for lat and lon fields. How do I specify when imported that the lat and lon fields should together be treated as a geopoint? Or do I have to create a mapping first and use that as an index template, or something like that?
Thanks

Hello Dave,

You need to merge two field to create a geo_point.

Merge two fields providing ‘latitude’ and ‘longitude’ to create a single Elasticsearch geo_point field using the pipeline processor at the time of importing a csv:

{
 "description": "Create geo point field",
 "processors": [
     {
      "drop": {
        "if": "ctx.latitude_field == null || ctx.longitude_field == null"
      }
    },
   {
     "set": {
       "field": "geo_location",
       "value": {
           "lat": "{{latitude_field}}",
           "lon": "{{longitude_field}}"
       }
     }
   }
 ]
}

The documentation is available here.

Regards
Manu