Add a $sample accumulator operator
So that it's easier to sample a number of items from each group, instead of writing lengthy DSL like this:
Ideally it can be expressed like this:
{
$group: {
_id: '$year',
samples: { $sample: 100 },
}
}
Hence making sampling 100 items from each group a snap to achieve!
1
vote
Fred
shared this idea