我有不同的产品的指标。 每个产品在许多商店。 该指数的一个字段是一个集合(Edm.GeographyPoint)至极持有该产品可在商店的坐标。
一些示例性数据 (CSV)that's导入在指数:
"product","vendor","coordinates"
"Coca Cola 0.5l","Billa","[{ ""type"": ""Point"", ""coordinates"": [48.1184669,16.2030506]},{ ""type"": ""Point"", ""coordinates"": [48.1184977,16.1877297]},{ ""type"": ""Point"", ""coordinates"": [48.1340644,16.2809381]}]"
"Nöm Mix Joghurt 250mg","Billa","[{ ""type"": ""Point"", ""coordinates"": [48.1184669,16.2030506]},{ ""type"": ""Point"", ""coordinates"": [48.1184977,16.1877297]},{ ""type"": ""Point"", ""coordinates"": [48.1340644,16.2809381]}]"
"Red Bull Dose 250ml","Billa","[{ ""type"": ""Point"", ""coordinates"": [48.1184669,16.2030506]},{ ""type"": ""Point"", ""coordinates"": [48.1184977,16.1877297]},{ ""type"": ""Point"", ""coordinates"": [48.1340644,16.2809381]}]"
现在,我想距离查询的结果进行排序。
搜索查询
search=red bull&$count=true&$orderby=geo.distance(coordinates, geography'POINT(48.1078023 16.1692154)') asc
这工作正常,如果我有一个地理点的每个数据集,但只要it'sa点我收到以下错误收集:
"Invalid expression: The argument for an invocation of a function with name 'geo.distance' is not a single value. All arguments for this function must be single values.\r\nParameter name: $orderby"
我的问题是,如果有另一个地球的功能,让我为了用点数据集在收集,或者如果我必须使用另一种模式为我的数据结构。