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 공식업데이트됨 7달 전
- AWS 공식업데이트됨 일 년 전