Importing geopoint from SQLserver using EntityFramework


(Kjell Wittmaack) #1

I'm trying to import a location from a table in SQLServer to a geo_point type. I'm using the Entity Framework in Visual Studio. I have to admit I have little experience in programming but I've managed to survive - until now :smile:

The column definitions look like this
[location.lon] [float] NULL,
[location.Lat] [float] NULL

The ES mapping definition looks like this
[ElasticsearchGeoPoint]
public GeoPoint location { get; set; }

The intention was to end up with a structure looking like this:
{
"mappings": {
"restaurant": {
"properties": {
"name": {
"type": "string"
},
"location": {
"type": "geo_point"
}
}
}
}
}

The load of data fails in ElasticSearch.


(system) #2