Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用Azure Search和Cosmos DB进行意外的随机类型检测_C#_Azure_Azure Cosmosdb_Azure Cognitive Search - Fatal编程技术网

C# 使用Azure Search和Cosmos DB进行意外的随机类型检测

C# 使用Azure Search和Cosmos DB进行意外的随机类型检测,c#,azure,azure-cosmosdb,azure-cognitive-search,C#,Azure,Azure Cosmosdb,Azure Cognitive Search,我有一个Cosmos DB集合正在被Azure Search索引和搜索。安装后,一切正常,我能够向Cosmos DB添加一些文档,并让索引器自动运行和索引新添加的文档 然而,我看到在添加了一些文档(随机数)之后,Azure Search Indexer将json值检测为Edm.Double而不是Edm.Int64,这会导致索引器不断失败。所有值均已验证为Edm.Int64类型。此外,更新值的方式是通过C#.Net SDK,使用UInt64类型的属性 下面是我的Cosmos DB集合中的一些值,这

我有一个Cosmos DB集合正在被Azure Search索引和搜索。安装后,一切正常,我能够向Cosmos DB添加一些文档,并让索引器自动运行和索引新添加的文档

然而,我看到在添加了一些文档(随机数)之后,Azure Search Indexer将json值检测为Edm.Double而不是Edm.Int64,这会导致索引器不断失败。所有值均已验证为Edm.Int64类型。此外,更新值的方式是通过C#.Net SDK,使用UInt64类型的属性


下面是我的Cosmos DB集合中的一些值,这些值最初是有效的,但是Azure Search会随机将其中一个值检测为Edm.Double,而不是Edm.Int64。1499746035741128 14997526598225921499752997529391106611499753827614475 1499997012640 14999970590815128 14999970842400641499997137151002514999972760675685 14999972969962006 14999973086735836 1499733072392 14999976826748983

您能包括您正在使用的数据源定义吗?具体来说,您指定用于提取数据的查询我没有手动创建数据源。连接是通过Azure Portal设置的,方法是进入Cosmos DB面板并单击“添加Azure搜索”。现在查看Azure搜索面板,数据源没有给我太多信息。索引器在字段旁边有适当的类型。也许,它与azure搜索服务无关。似乎与C#.Net SDK相关,请参考另一个。我已经向Azure宇宙数据库团队报告了。@TomSun MSFT这很可能就是问题所在。我正在使用Azure的Cosmos DB->Azure搜索web门户,我假设它正在使用C#.NET SDK来实际监视文档并将其添加到索引器中。当索引器进入失败状态时,我似乎必须不断重置索引器。我将跟随你的另一个SO线程,看看这个问题是否可以解决。另一个以同样方式表现出来的错误:链接的错误是针对SQL indexer的,而不是Cosmos DB的。