__construct()
__construct(string $name, string|null $initScript = null, string|null $mapScript = null, string|null $combineScript = null, string|null $reduceScript = null)
Parameters
string | $name | the name if this aggregation |
string|null | $initScript | Executed prior to any collection of documents |
string|null | $mapScript | Executed once per document collected |
string|null | $combineScript | Executed once on each shard after document collection is complete |
string|null | $reduceScript | Executed once on the coordinating node after all shards have returned their results |