复合索引的多个字段不能为数组

时间:2019-04-26 17:45:06

标签: aws-documentdb-mongoapi aws-documentdb

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

installed apps

我回想起有关mongodb的类似问题,documentdb实现与它有何不同?在documentdb中创建索引时,我没有看到任何问题,仅在还原过程中在还原中看到了

1 个答案:

答案 0 :(得分:1)

Amazon DocumentDB尚不支持在同一阵列上使用多个键创建复合索引。一种解决方法是在所需的数组字段上创建单个索引,因为Amazon DocumentDB查询计划程序可以在单个查询中使用多个索引。

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