[SERVER-34613] aggregation pipeline operators for array iterations like permutations and k combinations Created: 23/Apr/18  Updated: 04/Sep/18  Resolved: 30/Jul/18

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

Type: New Feature Priority: Major - P3
Reporter: Sean Watford Assignee: William Byrne III
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Currently no operations allow for combinations or permutations of grouped fields within the aggregation pipeline. MapReduce currently doesn't support multiple values returned as part of "reduce", so it's not an option at this point. However, it would best to have this implemented as part of the aggregation pipeline so that other operations can be chained like sorting.



 Comments   
Comment by Asya Kamsky [ 30/Jul/18 ]

Closing as it's not clear what exactly would satisfy this feature request.

swatford please re-open if you can provide more details, preferably with an example of input documents and result documents that are desired.

Comment by William Byrne III [ 14/Jun/18 ]

Hi Sean,

I am familiar with the basic mathematical uses of the terms k-combinations and permutations (as detailed in this wikipedia article) - both are selections of items from a set, but with permutations the order selected is significant. Using existing MongoDB operators you can generate permutations of a set of array members, but I am not clear on what you mean by "combinations or permutations of grouped fields".

Please clarify exactly what it is you are seeking to have these proposed new operators do. If you could provide sample input documents and what the outputs should look like then we will be better able to investigate this further for you.

Regards,

William Byrne III

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