loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
79 stars 56 forks source link

lng is sent instead of lon in Geo Point #19

Open debarko opened 9 years ago

debarko commented 9 years ago

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 commented 9 years ago

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.

pulkitsinghal commented 9 years ago

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

debarko commented 9 years ago

@pulkitsinghal surely I will do that.