问题描述
我正在玩选择查询索引.我想返回索引中有一个GeographyPoint的距离.我正在尝试这样的事情:其中GeoPoint是位置字段
I was playing around with the select for querying the index. I wanted to return a distance for a GeographyPoint I have in the index. I was trying something like this:where GeoPoint is the location field
如果您有纬度和经度以及位置,是否可以通过Select语句返回距离?
Is there a way to return distance in a Select statement if you have the lat and long and the location?
谢谢!
推荐答案
Azure Search当前不支持在搜索响应中返回geo.distance
的结果.请对该功能进行投票在用户语音中以帮助我们确定优先级.
Azure Search does not currently support returning the result of geo.distance
in the search response. Please vote for the feature on User Voice to help us prioritize.
作为一种解决方法,您可以自己计算距离. 此论坛主题和描述了实现此目的的几种方法.
As a workaround, you can calculate the distance yourself. This forum thread and this answer describe a few ways to do this.
这篇关于从select查询中的geo.distance函数返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!