1 回答
- 最新
- 投票最多
- 评论最多
0
Amazon DocumentDB does not currently support the ability to use indexes with $elemMatch - reference.
The workaround for your case would be to add an index on {"authors.id":1} and change the update query to:
db.collection.updateMany(
{ "authors.id" : "john"},
{ $pull : { "authors" : { "id" : "john" }}}
);
已回答 2 年前
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 7 个月前
- AWS 官方已更新 1 年前