I aggregate data using pymongo, the data is about 10 millions, I use
df_list = mycol.aggregate([{'$match': {'tbl_id': {'$in': doc_list}}}, {'$project': {'_id': 0}}], allowDiskUse=True) # doc_list may be very large
to aggregate the data, but it still went wrong,pymongo.errors.DocumentTooLarge: 'aggregate' command document too large, the allowDiskUse=True cannot work for me. How to deal with it?