-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Query
-
Fully Compatible
It would be very useful to be able to do operations on arrays as if they were vectors, in particular to add them. So this would add the 0th entry of the arrays in the pipeline and then the 1st, 2nd, etc. The result will be one document with an array with each entry being the sum of all the items in that same position in the source documents.
This can be useful in doing risk calculations in financial services.
This could be done today with unwinding which doesn't perform as well as this would.
- is related to
-
SERVER-17960 allow parallel $map processing for multiple arrays
- Closed
- related to
-
SERVER-10676 $multiply does not support a reference to an array
- Closed