gpt4 book ai didi

aws-documentdb-mongoapi - 复合索引的多个字段不能是数组

转载 作者:行者123 更新时间:2023-12-02 00:53:45 25 4
gpt4 key购买 nike

我在将数据从 mongodb 迁移到 documentdb 时遇到此错误。索引是在 documentdb 端创建的,没有问题。

2019-04-26T17:40:20.118+0000    error: multiple fields of compound index cannot be arrays
2019-04-26T17:40:20.445+0000 error: multiple fields of compound index cannot be arrays
2019-04-26T17:40:22.057+0000 error: multiple fields of compound index cannot be arrays

我看到关于 mongodb 的类似问题,documentdb 实现与它有何不同?在 documentdb 中创建索引时我没有看到任何问题,只有在还原期间在还原中看到它

最佳答案

Amazon DocumentDB 尚不支持在同一数组上创建具有多个键的复合索引。解决方法是在所需的数组字段上创建单独的索引,因为 Amazon DocumentDB 查询规划器能够在单个查询中使用多个索引。

https://docs.aws.amazon.com/documentdb/latest/developerguide/functional-differences.html

关于aws-documentdb-mongoapi - 复合索引的多个字段不能是数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55872646/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com