Skip to content

Commit 2853f07

Browse files
committed
addAggregation shortcut
1 parent 82e469f commit 2853f07

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/ElasticQuery.php‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ public function addFilter(\Spameri\ElasticQuery\Query\LeafQueryInterface $leafQu
111111
}
112112

113113

114+
public function addAggregation(\Spameri\ElasticQuery\Aggregation\LeafAggregationCollection $aggregation): void
115+
{
116+
$this->aggregation->add($aggregation);
117+
}
118+
119+
114120
public function toArray() : array
115121
{
116122
$array = $this->options->toArray();

0 commit comments

Comments
 (0)