1

When syncing data from mongodb to Elastic Search via mongo-connector, for the properties defined as geo_point in the mapping config, the logs show an error : "error":{"type":"number_format_exception","reason":"For input string: \"-71.0, 41.0\""}}}

My mapping config looks like this:

"locP": {
        "properties": {
          "coordinates": {
            "type": "geo_point"
          }
       }
      }

I have tried the following: Update2 from solution on Does Mongo-connector supports adding fields before inserting to Elasticsearch?

        if key == 'GeoPoint':
        value = {'lat': value['lat'], 'lon': value['lon']}

But still the same error.

If I try the Update1 from the above link, error comes for undefined "geopoint"

elif isinstance(value, Geopoint):
    return self.format.document({'lat': value['lat'], 'lon': value['lon']})

0 Answers0