[SERVER-5919] Add set/array operations to $unwind in new aggregation framework Created: 24/May/12  Updated: 25/Jun/15  Resolved: 08/Apr/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: kaleigh smith Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-14872 Aggregation pipeline project expressi... Closed
Related
related to SERVER-8582 Extend document expression language i... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

$unwind operates on a single array field. sometimes tag-like information can be stored in multiple document fields. it may be useful to allow $unwind to operate on multiple array fields whose contents have been combined by some set/array operation. this could help users group by values that are contained across multiple fields.

i.e.

{x: [s1, s2], y: [s2, s3]}

$unwind(x).$unwind(y) would create four documents.

would something like $unwind($union(x,y)) and group on $union(x,y) be possible/desirable?



 Comments   
Comment by Asya Kamsky [ 08/Apr/15 ]

Looks like having SERVER-14872 would eliminate this need - ability to combine two arrays into one and then doing a single unwind will created 4 desired documents.

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