public static function createFieldBoosting(
        string $field,
        float $factor = self::DEFAULT_FACTOR,
        float $missing = self::DEFAULT_MISSING,
        string $modifier = self::MODIFIER_NONE,
        float $weight = self::DEFAULT_WEIGHT,
        Filter $filter = null,
        string $scoreMode = self::SCORE_MODE_AVG
    ): ScoreStrategy {
        $scoreStrategy = self::createDefault();
        $scoreStrategy->type = self::BOOSTING_FIELD_VALUE;
        $scoreStrategy->configuration['field'] = $field;
        $scoreStrategy->configuration['factor'] = $factor;
        $scoreStrategy->configuration['missing'] = $missing;
        $scoreStrategy->configuration['modifier'] = $modifier;
        $scoreStrategy->weight = $weight;
        $scoreStrategy->filter = self::fixFilterFieldPath($filter);
        $scoreStrategy->scoreMode = $scoreMode;

        return $scoreStrategy;
    }
public static function createFieldBoosting(
        string $field,
        float $factor = self::DEFAULT_FACTOR,
        float $missing = self::DEFAULT_MISSING,
        string $modifier = self::MODIFIER_NONE,
        float $weight = self::DEFAULT_WEIGHT,
        Filter $filter = null,
        string $scoreMode = self::SCORE_MODE_AVG
    ): ScoreStrategy {
        $scoreStrategy = self::createDefault();
        $scoreStrategy->type = self::BOOSTING_FIELD_VALUE;
        $scoreStrategy->configuration['field'] = $field;
        $scoreStrategy->configuration['factor'] = $factor;
        $scoreStrategy->configuration['missing'] = $missing;
        $scoreStrategy->configuration['modifier'] = $modifier;
        $scoreStrategy->weight = $weight;
        $scoreStrategy->filter = self::fixFilterFieldPath($filter);
        $scoreStrategy->scoreMode = $scoreMode;

        return $scoreStrategy;
    }
public static function createFieldBoosting ( string $ field , float $ factor = self :: DEFAULT_FACTOR , float $ missing = self :: DEFAULT_MISSING , string $ modifier = self :: MODIFIER_NONE , float $ weight = self :: DEFAULT_WEIGHT , Filter $ filter = null , string $ scoreMode = self :: SCORE_MODE_AVG ) : ScoreStrategy { $ scoreStrategy = self :: createDefault ( ) ; $ scoreStrategy -> type = self :: BOOSTING_FIELD_VALUE ; $ scoreStrategy -> configuration [ 'field' ] = $ field ; $ scoreStrategy -> configuration [ 'factor' ] = $ factor ; $ scoreStrategy -> configuration [ 'missing' ] = $ missing ; $ scoreStrategy -> configuration [ 'modifier' ] = $ modifier ; $ scoreStrategy -> weight = $ weight ; $ scoreStrategy -> filter = self :: fixFilterFieldPath ( $ filter ) ; $ scoreStrategy -> scoreMode = $ scoreMode ; return $ scoreStrategy ; }
Create default field scoring.

@param string $field
@param float  $factor
@param float  $missing
@param string $modifier
@param float  $weight
@param Filter $filter
@param string $scoreMode

@return ScoreStrategy
Create default field scoring .