Example #1
0
 /**
  * Adds a Script to the query.
  *
  * @param string                   $name
  * @param \Elastica\AbstractScript $script Script object
  *
  * @return $this
  */
 public function addScriptField($name, AbstractScript $script)
 {
     $this->_params['script_fields'][$name] = $script->toArray();
     return $this;
 }