[DOCS-14267] Clarify ambiguous $ positional operator behavior when matching multiple arrays Created: 04/Mar/21 Updated: 30/Oct/23 Resolved: 03/Feb/22 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Edwin Zhou | Assignee: | Kenneth Dyer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | quick-win | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Days since reply: | 2 years, 5 days ago | ||||||||||||
| Epic Link: | DOCSP-11702 | ||||||||||||
| Description |
DescriptionThe $ positional operator behaves ambiguously when there are multiple matching arrays. The work tracked on SERVER-18500 has not seen any progress, but we see this ambiguity causing issues with some users in https://docs.mongodb.com/manual/reference/operator/update/positional/ We should clarify we currently don't guarantee which array we get the position from when using the positional operator when there are multiple array matches.
There is ambiguity around which index of the matched arrays (0 or 1) should we update b.
where we update b using the index matched in z (index 1). We may be able to guide users to consider $[<identifier>] if they need to make changes to an array based on a specified position. An example of favoring $[<identifier>] over $ can be found in my closing comment on SERVER-54687 Scope of changesImpact to Other DocsMVP (Work and Date)Resources (Scope or Design Docs, Invision, etc.) |
| Comments |
| Comment by Githook User [ 04/Feb/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message: DOCSP-14267- isLagged Update (#407)
|
| Comment by Githook User [ 03/Feb/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message: |
| Comment by Githook User [ 03/Feb/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message: |
| Comment by Githook User [ 03/Feb/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message:
Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> |
| Comment by Githook User [ 03/Feb/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message:
Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> |
| Comment by Githook User [ 03/Feb/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message:
Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> |
| Comment by Githook User [ 28/Jan/22 ] |
|
Author: {'name': 'Kenneth P. J. Dyer', 'email': '93145796+kennethdyer@users.noreply.github.com', 'username': 'kennethdyer'}Message:
Co-authored-by: Kenneth P. J. Dyer <kennethpdyer@hecatia.local> |