我想从csv文件(blob)中导入Collection(Edm.GeographyPoint)类型的字段中的多个地理点。我找不到用于csv文件的正确语法-索引器总是抱怨说,将字符串导入到地理字段中是无效的。
索引单个Edm.GeographyPoint可以正常工作。
实际CSV (不起作用)如下所示:
"product","vendor","coordinates"
"Coca Cola 0.5l","Billa","[{ ""type"": ""Point"", ""coordinates"": [48.4547895 16.5897845]},{ ""type"": ""Point"", ""coordinates"": [48.4567815 16.6854853]},{ ""type"": ""Point"", ""coordinates"": [48.8794568 16.5687491]}]"
我正在寻找CSV中此集合的正确格式/语法。
答案 0 :(得分:1)
您缺少将x和y坐标分开的逗号。 尝试像这样构造CSV:
"product","vendor","coordinates"
"Coca Cola 0.5l","Billa","[{ ""type"": ""Point"", ""coordinates"": [48.4547895,16.5897845]},{ ""type"": ""Point"", ""coordinates"": [48.4567815,16.6854853]},{ ""type"": ""Point"", ""coordinates"": [48.8794568,16.5687491]}]"
此处还有设置CSV索引的说明:https://docs.microsoft.com/en-us/azure/search/search-howto-index-csv-blobs#setting-up-csv-indexing