更新时间:2023-11-15 18:40:58
You're doing the aggregation correctly, but as the error message indicates, the full result of the aggregate
call cannot be larger than 16 MB.
解决方法是添加一个过滤器以减小结果的大小,或者改用map-reduce并将结果输出到另一个集合.
Work-arounds would be to either add a filter to reduce the size of the result or use map-reduce instead and output the result to another collection.