$_name
$_name : string
Class ScriptedMetric.
This function can be used to handle params for queries, filter
__construct(string $name, string|null $initScript = null, string|null $mapScript = null, string|null $combineScript = null, string|null $reduceScript = null)
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 |
addAggregation(\Elastica\Aggregation\AbstractAggregation $aggregation) : $this
Add a sub-aggregation.
\Elastica\Aggregation\AbstractAggregation | $aggregation |