I’m trying to write an aggregation to return information about my sources and I can’t find a simple way to union values of arrays of the documents I group.
Where is the equivalent of having “_id” : { “C” : “C1”, “K” : “K1” } as a group key in the above c# SelectMany? I feel the above do a lot less work that your Wanted Doc.
Optimizing too early is not good because the performance issues might be elsewhere than where we fear they will be. Implements using the simpler code and optimize only if you have issues.