我想知道solr中geodist()函数的逻辑
我想知道 solr 中 geodist() 函数的逻辑,因为我在 geodist() 上得到不同的距离,而我通过谷歌地图检查相同的距离。
I wan to know the logic of geodist() function in solr as I am getting different distance on geodist() and while I am checking the same through google maps.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“geodist() 函数的逻辑”基于计算球体两点之间的距离。您使用 Google 地图获得不同距离的原因是 Google 使用导航距离,而不是点对点。半正矢(球体上两点之间的大圆距离;纬度、经度)是 Solr 用于计算两点之间距离的默认系统。 Solr 还支持其他距离计算器,例如欧几里得距离,即线距离。
The 'logic of geodist() function' is based on calculating the distance between 2 points of a sphere. The reason you are getting different distances with Google Maps is due to the fact that Google uses navigational distance - not point to point. Haversine (great-circle distances between two points on a sphere; lat,lon) is the default system used by Solr to calculate the distance between 2 points. Solr also supports other distance calculators such as Euclidean which is line distance.