[SERVER-28779] Allow $[] syntax for specifying array indexes in updates Created: 12/Apr/17  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-28763 Create UpdateArrayNode Closed
Related
related to SERVER-4753 array indexes and object subfields sh... Backlog
Assigned Teams:
Query Optimization
Participants:

 Description   

The update expression

{$set: {"a.$[5]": 0}}

should update the element at position 5 of array a to 0. This syntax should be used for updating arrays in oplog entries instead of

{$set: {"a.5": 0}}

which is ambiguous as to whether it means the array element at position 5, or a field of an object with name "5".



 Comments   
Comment by David Storch [ 01/Aug/17 ]

No, let's just put it on the backlog for now. justin.seyster, we should talk about what you should work on next instead.

Comment by Tess Avitabile (Inactive) [ 01/Aug/17 ]

david.storch, should this be closed as Won't Fix?

Comment by Ian Whalen (Inactive) [ 28/Jul/17 ]

Note that the syntax/scope for this has not yet been approved, so please prioritize after your other tasks to allow time for that approval.

Generated at Thu Feb 08 04:19:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.