1 Answer
- Newest
- Most votes
- Most comments
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" }}}
);
answered 3 years ago
Relevant content
- asked 2 years ago
- asked 6 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago