[SERVER-6436] Add method for unwinding nested arrays Created: 13/Jul/12 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | expression | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
Right now $unwind can only unwind an array that is not nested within another array. For example 'a.b' can be unwound in this document:
Current behavior is to not unwind anything in these cases. |
| Comments |
| Comment by Evan Johnson [ 13/Mar/13 ] |
|
I think some of these issues can be solved by using stacked $unwinds and $projects in the pipeline, like so: db.foo.aggregate( , , } |