How to get totalDocsExamined with explain in pymongo

Hello @harris,

In PyMongo, there is only one way to specify the explain on aggregate method - that is via the db.command (that is same as mongo shell’s runCommand). And, there are no option to specify the executionStats and allPlansExecution modes. This is an earlier post discussing the syntax: