DocumentDb 需要 64 位
DocumentDb requires 64bit
我有这个代码:
var list = _client.CreateDocumentQuery<MatchActivityDataModel>(_collection.SelfLink, sql, new FeedOptions() { EnableCrossPartitionQuery = false });
var result = list.ToList();
其中 sql 是 SqlQuerySpec object。它导致错误:"Partition routing information cannot be extracted from the query when running in a 32-bit process. To complete your query and avoid this exception, ensure that your host process is 64-bit."
我知道如何在 64 位进程中通过 运行 修复它。但是,我在 Azure 中托管我的应用程序,并使用 64 托管它迫使我升级到更昂贵的层(我不从这个应用程序中赚钱,所以我宁愿将它保持在尽可能低的层级)。有没有办法让它在 32 位环境中工作?我的 collection 没有分区。
.NET SDK 1.11.3 对此进行了修复。您可以在该版本的 32 位模式下创建单个分区集合。
从 1.11.4 开始,我们还支持在 32 位模式下创建分区集合或执行跨分区查询。
32 位模式的性能稍差,但如果您有升级到 64 位的限制,应该没问题。
升级到最新的 SDK 后,如果这能解决您的问题,请告诉我。
我有这个代码:
var list = _client.CreateDocumentQuery<MatchActivityDataModel>(_collection.SelfLink, sql, new FeedOptions() { EnableCrossPartitionQuery = false });
var result = list.ToList();
其中 sql 是 SqlQuerySpec object。它导致错误:"Partition routing information cannot be extracted from the query when running in a 32-bit process. To complete your query and avoid this exception, ensure that your host process is 64-bit."
我知道如何在 64 位进程中通过 运行 修复它。但是,我在 Azure 中托管我的应用程序,并使用 64 托管它迫使我升级到更昂贵的层(我不从这个应用程序中赚钱,所以我宁愿将它保持在尽可能低的层级)。有没有办法让它在 32 位环境中工作?我的 collection 没有分区。
.NET SDK 1.11.3 对此进行了修复。您可以在该版本的 32 位模式下创建单个分区集合。
从 1.11.4 开始,我们还支持在 32 位模式下创建分区集合或执行跨分区查询。
32 位模式的性能稍差,但如果您有升级到 64 位的限制,应该没问题。
升级到最新的 SDK 后,如果这能解决您的问题,请告诉我。