src/Query/Compound/FunctionScoreQuery.php
public function addWeightFunction($weight, BuilderInterface $query = null)
    {
        $function = [
            'weight' => $weight,
        ];

        $this->applyFilter($function, $query);

        $this->functions[] = $function;

        return $this;
    }
public function addWeightFunction($weight, BuilderInterface $query = null)
    {
        $function = [
            'weight' => $weight,
        ];

        $this->applyFilter($function, $query);

        $this->functions[] = $function;

        return $this;
    }
public function addWeightFunction ( $ weight , BuilderInterface $ query = null ) { $ function = [ 'weight' => $ weight , ] ; $ this -> applyFilter ( $ function , $ query ) ; $ this -> functions [ ] = $ function ; return $ this ; }
Adds function to function score without decay function. Influence search score only for specific query.

@param float            $weight
@param BuilderInterface $query

@return $this
Adds function to function score without decay function . Influence search score only for specific query .