Lines Matching defs:script
22 * Set a script for this aggregation.
24 * @param \Elastica\Script\AbstractScript|string $script
28 public function setScript($script): self
30 return $this->setParam('script', $script);
38 if (!$this->hasParam('field') && !$this->hasParam('script')) {
39 throw new InvalidException('Either the field param or the script param should be set');
45 if (isset($array[$baseName]['script']) && \is_array($array[$baseName]['script'])) {
46 $script = $array[$baseName]['script'];
48 unset($array[$baseName]['script']);
50 $array[$baseName] = \array_merge($array[$baseName], $script);