Package de.cxp.ocs.config
Class ScoringConfiguration
java.lang.Object
de.cxp.ocs.config.ScoringConfiguration
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 ClassesModifier and TypeClassDescriptionstatic class
Specific configuration for each scoring rule. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetBoostMode
(BoostMode boostMode) The boost_mode specified, how the score is combined with the score of the query.setScoreFunctions
(List<ScoringConfiguration.ScoringFunction> scoreFunctions) Set the list of scoring rules.setScoreMode
(ScoreMode scoreMode) The score_mode specifies how the computed scores are combined.
-
Constructor Details
-
ScoringConfiguration
public ScoringConfiguration()
-
-
Method Details
-
setScoreMode
The score_mode specifies how the computed scores are combined. Default: AVG- Parameters:
scoreMode
- score mode- Returns:
- self
-
setBoostMode
The boost_mode specified, how the score is combined with the score of the query. Default: AVG- Parameters:
boostMode
- boost mode- Returns:
- self
-
setScoreFunctions
public ScoringConfiguration setScoreFunctions(List<ScoringConfiguration.ScoringFunction> scoreFunctions) Set the list of scoring rules.- Parameters:
scoreFunctions
- score functions- Returns:
- self
-