update-many
Update multiple documents in a MongoDB collection by specifying a filter and applying modifications; supports upsert for inserting new documents if no matches are found.
Instructions
Updates all documents that match the specified filter for a collection
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | Yes | Database name | |
filter | No | The selection criteria for the update, matching the syntax of the filter argument of db.collection.updateOne() | |
update | Yes | An update document describing the modifications to apply using update operator expressions | |
upsert | No | Controls whether to insert a new document if no documents match the filter |