src/Query/Compound/FunctionScoreQuery.php
public function addFieldValueFactorFunction($field, $factor, $modifier = 'none', BuilderInterface $query = null)
    {
        $function = [
            'field_value_factor' => [
                'field' => $field,
                'factor' => $factor,
                'modifier' => $modifier,
            ],
        ];

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

        $this->functions[] = $function;

        return $this;
    }
public function addFieldValueFactorFunction($field, $factor, $modifier = 'none', BuilderInterface $query = null)
    {
        $function = [
            'field_value_factor' => [
                'field' => $field,
                'factor' => $factor,
                'modifier' => $modifier,
            ],
        ];

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

        $this->functions[] = $function;

        return $this;
    }
public function addFieldValueFactorFunction ( $ field , $ factor , $ modifier = 'none' , BuilderInterface $ query = null ) { $ function = [ 'field_value_factor' => [ 'field' => $ field , 'factor' => $ factor , 'modifier' => $ modifier , ] , ] ; $ this -> applyFilter ( $ function , $ query ) ; $ this -> functions [ ] = $ function ; return $ this ; }
Creates field_value_factor function.

@param string           $field
@param float            $factor
@param string           $modifier
@param BuilderInterface $query

@return $this
Creates field_value_factor function .