NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
public class LinearDecayFunctionBuilder extends DecayFunctionBuilder<LinearDecayFunctionBuilder>
DecayFunctionBuilder.AbstractDistanceScoreFunction
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static DecayFunction |
LINEAR_DECAY_FUNCTION |
|
static java.lang.String |
NAME |
|
static ScoreFunctionParser<LinearDecayFunctionBuilder> |
PARSER |
DECAY, DEFAULT_DECAY, DEFAULT_MULTI_VALUE_MODE, OFFSET, ORIGIN, SCALE
EMPTY_PARAMS
Constructor | Description |
---|---|
LinearDecayFunctionBuilder(java.lang.String fieldName,
java.lang.Object origin,
java.lang.Object scale,
java.lang.Object offset) |
|
LinearDecayFunctionBuilder(java.lang.String fieldName,
java.lang.Object origin,
java.lang.Object scale,
java.lang.Object offset,
double decay) |
|
LinearDecayFunctionBuilder(StreamInput in) |
Read from a stream.
|
Modifier and Type | Method | Description |
---|---|---|
DecayFunction |
getDecayFunction() |
Override this function if you want to produce your own scorer.
|
java.lang.String |
getName() |
The name of this score function.
|
doEquals, doHashCode, doToFunction, doWriteTo, doXContent, getFieldName, getFunctionBytes, getMultiValueMode, setMultiValueMode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
equals, getWeight, getWriteableName, hashCode, setWeight, toFunction, toXContent, writeTo
isFragment
public static final java.lang.String NAME
public static final ScoreFunctionParser<LinearDecayFunctionBuilder> PARSER
public static final DecayFunction LINEAR_DECAY_FUNCTION
public LinearDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset)
public LinearDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset, double decay)
public LinearDecayFunctionBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
public java.lang.String getName()
ScoreFunctionBuilder
getName
in class ScoreFunctionBuilder<LinearDecayFunctionBuilder>
public DecayFunction getDecayFunction()
DecayFunctionBuilder
getDecayFunction
in class DecayFunctionBuilder<LinearDecayFunctionBuilder>