1<?php
2
3namespace Elastica\Aggregation;
4
5/**
6 * Implements a Extended Stats Bucket Aggregation.
7 *
8 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-extended-stats-bucket-aggregation.html
9 */
10class ExtendedStatsBucket extends AbstractAggregation implements GapPolicyInterface
11{
12    use Traits\BucketsPathTrait;
13    use Traits\GapPolicyTrait;
14
15    public function __construct(string $name, string $bucketsPath)
16    {
17        parent::__construct($name);
18
19        $this->setBucketsPath($bucketsPath);
20    }
21
22    public function setFormat(string $format): self
23    {
24        return $this->setParam('format', $format);
25    }
26
27    public function setSigma(int $sigma): self
28    {
29        return $this->setParam('sigma', $sigma);
30    }
31}
32