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
![](https://secure.gravatar.com/avatar/fd7d32bc81efb001217164fc7e4c90b5?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)