【问题标题】:Issues with azure cosmosDB 3.6 on field sort operation with index exceeded maximum numberazure cosmosDB 3.6 对索引超过最大数量的字段排序操作的问题
【发布时间】:2020-03-04 02:18:58
【问题描述】:

使用启用了 mongodb API 的 Azure cosmosDB 3.6 版弹出问题,基本上我们想对集合中的特定字段进行排序,但出现错误:

 Error: error: {
    "ok" : 0,
    "errmsg" : "Error=2, Details='Microsoft.Azure.Cosmos.Query.Core.Monads.ExceptionWithStackTraceException: TryCatch resulted in an exception. ---> Microsoft.Azure.Cosmos.Query.Core.Monads.ExceptionWithStackTraceException: TryCatch resulted in an exception. ---> Microsoft.Azure.Cosmos.Query.Core.Monads.ExceptionWithStackTraceException: TryCatch resulted in an exception. ... ...
    "code" : 2,
    "codeName" : "BadValue"
}

但是,如果给定索引,我们发现它在排序操作中与其他字段顺利进行,但当我们尝试将索引添加到此特定字段上的当前集合时,另一个问题弹出窗口可能会更容易解决有点给我们带来了死胡同。

{
    "ok" : 0.0,
    "errmsg" : "Exceeded maximum number of indexes",
    "code" : 67,
    "codeName" : "CannotCreateIndex"
}

之前在 3.2 版上使用 cosmosdb 和 MongoDB API 确实令人困惑,我们得到了微软团队的官方支持,说在 3.2 版上索引是自动创建的,因此我们遇到了 indexes exceeds the limit 类似的问题。但应该在 3.6 版中消失,这就是我们决定使用 cosmosDB 将所有现有系统迁移到 Azure 云的原因。

在我们当前尝试执行 createIndex 操作的这个特定集合中,只有 17 个索引存在,对于 "Exceeded maximum number of indexes" 错误的这个限制到底是什么感到困惑。

【问题讨论】:

    标签: azure azure-cosmosdb azure-cosmosdb-mongoapi


    【解决方案1】:

    您似乎达到了最大索引限制的软限制,您可以提交支持请求以增加您帐户的最大索引限制。

    【讨论】:

      猜你喜欢
      • 2018-01-02
      • 2021-12-06
      • 1970-01-01
      • 2017-09-13
      • 2018-04-24
      • 2018-06-21
      • 1970-01-01
      • 2021-02-21
      • 1970-01-01
      相关资源
      最近更新 更多