[DOCS-12001] Documentation of $[<identifier>] contradicts documentation of update Created: 27/Aug/18 Updated: 30/Oct/23 Resolved: 15/Nov/18 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Dario Cutillas | Assignee: | Kay Kim (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 5 years, 13 weeks ago |
| Epic Link: | DOCSP-1769 |
| Description |
|
---------------------------- Original DescriptionIn the documentation of the $[<identifier>] operator, section Update All Array Elements that Match Multiple Conditions, it states: To modify the value of the std field for all elements in the grades array where both the grade is greater than or equal to 80 and the std is greater than or equal to 5, use the positional $[<identifier>] operator and arrayFilters:
However, isn't that contradictory to what it is explained in the update operation documentation with regards to arrayFilter?: You can include the same identifier multiple times in the update document; however, for each distinct identifier ($[identifier]) in the update document, you must specify exactly one corresponding array filter document. That is, you cannot specify multiple array filter documents for the same identifier. For example, if the update statement includes the identifier x (possibly multiple times), you cannot specify the following value for arrayFilters:
---------------------------- DescriptionScope of changes (files that need work and how much)Impact to other docs outside of this productMVP (work and date?)Resources (e.g. Scope Docs, Invision) |
| Comments |
| Comment by Githook User [ 15/Nov/18 ] | |||||||
|
Author: {'name': 'Kay Kim', 'email': 'kay.kim@mongodb.com'}Message: | |||||||
| Comment by Githook User [ 15/Nov/18 ] | |||||||
|
Author: {'name': 'Kay Kim', 'email': 'kay.kim@mongodb.com'}Message: | |||||||
| Comment by Githook User [ 15/Nov/18 ] | |||||||
|
Author: {'name': 'Kay Kim', 'email': 'kay.kim@mongodb.com'}Message: | |||||||
| Comment by Kay Kim (Inactive) [ 15/Nov/18 ] | |||||||
|
Thanks for filing this ticket. I think the formatting of the example in the update page may be the source of confusion:
Whereas in the identifier page, there's only one filter document for "elem" that contains the two fields:
We will update the doc so that Thanks again for taking the time to file the ticket. Much appreciated. |