Class FunctionalBoost
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.request.search.boost.FunctionalBoost
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface co.elasticsearch.enterprisesearch.client.model.request.search.boost.Boost
Boost.BoostType, Boost.Function, Boost.Operation
-
-
Constructor Summary
Constructors Constructor Description FunctionalBoost()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigDecimalgetFactor()Alter the impact of a boost on the score of a document.Boost.FunctiongetFunction()Type of function to calculate the boost value.StringgetName()The name of the boostBoost.OperationgetOperation()The arithmetic operation used to combine the original document score with your boost value.Boost.BoostTypegetType()Type of boostFunctionalBoostsetFactor(BigDecimal factor)Alter the impact of a boost on the score of a document.FunctionalBoostsetFunction(Boost.Function function)Type of function to calculate the boost value.FunctionalBoostsetName(String name)Set the name of the boostFunctionalBoostsetOperation(Boost.Operation operation)The arithmetic operation used to combine the original document score with your boost value.
-
-
-
Method Detail
-
getType
public Boost.BoostType getType()
Description copied from interface:BoostType of boost
-
getFunction
public Boost.Function getFunction()
Type of function to calculate the boost value. Can be linear, exponential, or gaussian. All functions decay rapidly towards 0 after about 2 days because the decay scale is 1 day.- Returns:
- The function
-
getOperation
public Boost.Operation getOperation()
The arithmetic operation used to combine the original document score with your boost value. Can be add or multiply. Defaults to add.- Returns:
- The operation
-
getFactor
public BigDecimal getFactor()
Description copied from interface:BoostAlter the impact of a boost on the score of a document. Must be between 0 and 10. Defaults to 1.0. A negative factor or fractional factor will not deboost a result. The factor parameter multiplies the value of the boost but does not significantly affect the decay function scale.
-
setFunction
public FunctionalBoost setFunction(Boost.Function function)
Type of function to calculate the boost value. Can be linear, exponential, or gaussian. All functions decay rapidly towards 0 after about 2 days because the decay scale is 1 day.- Parameters:
function- The function to calculate the boost value- Returns:
this.
-
setOperation
public FunctionalBoost setOperation(Boost.Operation operation)
The arithmetic operation used to combine the original document score with your boost value. Can be add or multiply. Defaults to add.- Parameters:
operation- The operation used to combine the original document with your boost- Returns:
this.
-
setFactor
public FunctionalBoost setFactor(BigDecimal factor)
Description copied from interface:BoostAlter the impact of a boost on the score of a document. Must be between 0 and 10. Defaults to 1.0. A negative factor or fractional factor will not deboost a result. The factor parameter multiplies the value of the boost but does not significantly affect the decay function scale.
-
setName
public FunctionalBoost setName(String name)
Description copied from interface:BoostSet the name of the boost
-
-