[DOCS-12773] Explicitly refer to "Single Field Matches" for positional "$ (update)" operator Created: 03/Jun/19  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Eric Sedor Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-3276 Positional Update with multiple elements Closed
is related to SERVER-14662 Positional projection queries (and po... Closed
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769
Story Points: 0.1

 Description   

Description

As of DOCS-3276, https://docs.mongodb.com/manual/reference/operator/update/positional/ provides instructions for matching multiple fields within an array for a positional update, using elemMatch.

However, given the caveats with matching multiple fields (SERVER-14662), I think "the positional $ operator acts as a placeholder for the first element that matches the query document" language is leading to confusion.

Would it be possible to reference something like "Update Embedded Documents Using a Single Field Match" in the Definition or Behavior section, as a prompt to direct readers to the "Update Embedded Documents Using Multiple Field Matches" section at the end of the page?

By way of example, this is explicit in the "$ (projection)" documentation at https://docs.mongodb.com/manual/reference/operator/projection/positional/#array-field-limitations, with the following language: "The query document should only contain a single condition on the array field being projected. Multiple conditions may override each other internally and lead to undefined behavior."

Thank you in advance!

Scope of changes

  • Update and backport as needed


 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 08:06:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.