I am writing a server method which needs to run a large aggregate query and process the results. The query runs fine in Robo3T but in Meteor I get the following error returned:
aggregation result exceeds maximum document size (16MB)
What are my options? Am I able to get the query to return a cursor rather than an array, or do I need to add in $skip and $limit and run the query in chunks?
(I use the meteorhacks:aggregate package to allow me to run aggregate queries).