【发布时间】:2020-03-23 13:18:08
【问题描述】:
当我在 Cosmos DB 3.6 中运行以下命令时,
db.collectionName.ensureIndex({"Contract.ContractNumber":1, "PBPNumber":1})
Contract.ContractNumber是子文档路径。
我得到了他的错误
{
"ok" : 0,
"errmsg" : "Compound index does not currently support nested documents or arrays.",
"code" : 115,
"codeName" : "CommandNotSupported"
}
相同的命令在开箱即用的 Mongo 中成功。
还有办法吗?
谢谢
【问题讨论】:
标签: mongodb indexing field azure-cosmosdb