Supported options:
* allowDiskUse (boolean): Enables writing to temporary files. When set
to true, aggregation stages can write data to the _tmp sub-directory
in the dbPath directory. The default is false.
* batchSize (integer): The number of documents to return per batch.
* bypassDocumentValidation (boolean): If true, allows the write to opt
out of document level validation. This only applies when the $out
stage is specified.
For servers < 3.2, this option is ignored as document level validation
is not available.
* maxTimeMS (integer): The maximum amount of time to allow the query to
run.
* readConcern (MongoDB\Driver\ReadConcern): Read concern. Note that a
"majority" read concern is not compatible with the $out stage.
For servers < 3.2, this option is ignored as read concern is not
available.
* readPreference (MongoDB\Driver\ReadPreference): Read preference.
* typeMap (array): Type map for BSON deserialization. This will be
applied to the returned Cursor (it is not sent to the server).
This is not supported for inline aggregation results (i.e. useCursor
option is false or the server versions < 2.6).
* useCursor (boolean): Indicates whether the command will request that
the server provide results using a cursor. The default is true.
For servers < 2.6, this option is ignored as aggregation cursors are
not available.
For servers >= 2.6, this option allows users to turn off cursors if
necessary to aid in mongod/mongos upgrades.