setBucketsPath($bucketsPath); } if (null !== $script) { $this->setScript($script); } } /** * Set the buckets_path for this aggregation. * * @param array $bucketsPath * * @return $this */ public function setBucketsPath($bucketsPath) { return $this->setParam('buckets_path', $bucketsPath); } /** * Set the gap policy for this aggregation. * * @param string $gapPolicy * * @return $this */ public function setGapPolicy(string $gapPolicy = 'skip') { return $this->setParam('gap_policy', $gapPolicy); } }