Package de.cxp.ocs.config
Class ScoringConfiguration
- java.lang.Object
-
- de.cxp.ocs.config.ScoringConfiguration
-
public class ScoringConfiguration extends Object
Configuration that influences how the result hits are scored. Checkout the Elasticsearch scoring function documentation. This is basically a one to one mapping of it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScoringConfiguration.ScoringFunctionSpecific configuration for each scoring rule.
-
Constructor Summary
Constructors Constructor Description ScoringConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScoringConfigurationsetBoostMode(BoostMode boostMode)The boost_mode specified, how the score is combined with the score of the query.ScoringConfigurationsetScoreFunctions(List<ScoringConfiguration.ScoringFunction> scoreFunctions)Set the list of scoring rules.ScoringConfigurationsetScoreMode(ScoreMode scoreMode)The score_mode specifies how the computed scores are combined.
-
-
-
Method Detail
-
setScoreMode
public ScoringConfiguration setScoreMode(ScoreMode scoreMode)
The score_mode specifies how the computed scores are combined. Default: AVG- Parameters:
scoreMode-- Returns:
- self
-
setBoostMode
public ScoringConfiguration setBoostMode(BoostMode boostMode)
The boost_mode specified, how the score is combined with the score of the query. Default: AVG- Parameters:
boostMode-- Returns:
- self
-
setScoreFunctions
public ScoringConfiguration setScoreFunctions(List<ScoringConfiguration.ScoringFunction> scoreFunctions)
Set the list of scoring rules.- Parameters:
scoreFunctions-- Returns:
- self
-
-