public function functions(\Closure $search, \Closure $closure, $parameters = [])
    {
        $builder = new self($this->connection, new $this->query());
        $search($builder);

        $builder = new FunctionScoreBuilder($builder, $parameters);

        $closure($builder);

        $this->append($builder->getQuery());

        return $this;
    }
public function functions(\Closure $search, \Closure $closure, $parameters = [])
    {
        $builder = new self($this->connection, new $this->query());
        $search($builder);

        $builder = new FunctionScoreBuilder($builder, $parameters);

        $closure($builder);

        $this->append($builder->getQuery());

        return $this;
    }
public function functions ( \ Closure $ search , \ Closure $ closure , $ parameters = [ ] ) { $ builder = new self ( $ this -> connection , new $ this -> query ( ) ) ; $ search ( $ builder ) ; $ builder = new FunctionScoreBuilder ( $ builder , $ parameters ) ; $ closure ( $ builder ) ; $ this -> append ( $ builder -> getQuery ( ) ) ; return $ this ; }
Add function score.

@param \Closure $search
@param \Closure $closure
@param array    $parameters

@return $this
Add function score .