lib/Elastica/Query/FunctionScore.php
public function addScriptScoreFunction(AbstractScript $script, AbstractQuery $filter = null, float $weight = null)
    {
        return $this->addFunction('script_score', $script, $filter, $weight);
    }
public function addScriptScoreFunction(AbstractScript $script, AbstractQuery $filter = null, float $weight = null)
    {
        return $this->addFunction('script_score', $script, $filter, $weight);
    }
public function addScriptScoreFunction ( AbstractScript $ script , AbstractQuery $ filter = null , float $ weight = null ) { return $ this -> addFunction ( 'script_score' , $ script , $ filter , $ weight ) ; }
Add a script_score function to the query.

@param AbstractScript $script a Script object
@param AbstractQuery  $filter an optional filter to apply to the function
@param float          $weight the weight of the function

@return $this
Add a script_score function to the query .