loopback-connector-elastic-search icon indicating copy to clipboard operation
loopback-connector-elastic-search copied to clipboard

lng is sent instead of lon in Geo Point

Open debarko opened this issue 10 years ago • 3 comments

Geo point in elasticsearch takes lat, lon

Instead lat, lng is sent from this connector. Can we please fix it. Or at least tell point out where it is. I will send a PR if required.

debarko avatar Jun 30 '15 14:06 debarko

Loopback Geo point Class uses lng and Elasticsearch uses lon. If we use Loopback one then ES fails saying lon should be a number. If we use ES one then validation on Loopback fails.

Current fix is to define Loopback field type as string and ES one as geo_point and then send the lat,lon as "1,2" in a string to ES.

debarko avatar Jun 30 '15 15:06 debarko

Thanks for the workaround! I'm excited that you are using ES as a backend, do share your experiences in over gitter chat room

pulkitsinghal avatar Jun 30 '15 16:06 pulkitsinghal

@pulkitsinghal surely I will do that.

debarko avatar Jun 30 '15 17:06 debarko