lib/Elastica/Query.php
public function setScriptFields($scriptFields)
    {
        if (\is_array($scriptFields)) {
            $scriptFields = new ScriptFields($scriptFields);
        }

        return $this->setParam('script_fields', $scriptFields);
    }
public function setScriptFields($scriptFields)
    {
        if (\is_array($scriptFields)) {
            $scriptFields = new ScriptFields($scriptFields);
        }

        return $this->setParam('script_fields', $scriptFields);
    }
public function setScriptFields ( $ scriptFields ) { if ( \ is_array ( $ scriptFields ) ) { $ scriptFields = new ScriptFields ( $ scriptFields ) ; } return $ this -> setParam ( 'script_fields' , $ scriptFields ) ; }
Set script fields.

@param array|\Elastica\Script\ScriptFields $scriptFields Script fields

@return $this

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html
Set script fields .