For AI agents: a documentation index is available at https://www.mongodb.com/zh-cn/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.

Positional Update Operators

The following operators act as placeholders to identify which array elements to update:

Name
Description

Acts as a placeholder to update the first element that matches the query condition.

Acts as a placeholder to update all elements in an array for the documents that match the query condition.

Acts as a placeholder to update all elements that match the arrayFilters condition for the documents that match the query condition.

Rate this page