Elasticsearch > logstash > Elasticsearch failing - illegal latitude value

Dumping from an ES 1.7.6 server to 2.4.4 with the logstash elasticsearch input I see the following message for the majority of my documents:

"status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"illegal latitude value [-98.92457739999999] for pin.location"}}}},

I've tried truncating these values using the following but still get the same message:

truncate {
    length_bytes => 4
    fields => "[pin][location][lat]"

I've tried truncating pin.location as well but that seems to have no effect.

I don't mind losing some accuracy if I can get these events in but I'm at a loss how to get them in there.

You've probably mixed up the order of longitude and latitude. Latitudes are always in the [-90, 90] range but longitudes are in [-180, 180].

1 Like

Yes, that was it. Somehow the service that's passing it had them swapped.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.