Class LinearDecayFunctionBuilder
java.lang.Object
org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder<DFB>
org.elasticsearch.index.query.functionscore.DecayFunctionBuilder<LinearDecayFunctionBuilder>
org.elasticsearch.index.query.functionscore.LinearDecayFunctionBuilder
- All Implemented Interfaces:
NamedWriteable
,Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
public class LinearDecayFunctionBuilder extends DecayFunctionBuilder<LinearDecayFunctionBuilder>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
DecayFunctionBuilder.AbstractDistanceScoreFunction
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields Modifier and Type Field Description static DecayFunction
LINEAR_DECAY_FUNCTION
static java.lang.String
NAME
static ScoreFunctionParser<LinearDecayFunctionBuilder>
PARSER
Fields inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
DECAY, DEFAULT_DECAY, DEFAULT_MULTI_VALUE_MODE, OFFSET, ORIGIN, SCALE
-
Constructor Summary
Constructors 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. -
Method Summary
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.Methods inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
doEquals, doHashCode, doToFunction, doWriteTo, doXContent, getFieldName, getFunctionBytes, getMultiValueMode, setMultiValueMode
Methods inherited from class org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder
equals, getWeight, getWriteableName, hashCode, setWeight, toFunction, toXContent, writeTo
-
Field Details
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
PARSER
-
LINEAR_DECAY_FUNCTION
-
-
Constructor Details
-
LinearDecayFunctionBuilder
public LinearDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset) -
LinearDecayFunctionBuilder
public LinearDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset, double decay) -
LinearDecayFunctionBuilder
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
getName
public java.lang.String getName()Description copied from class:ScoreFunctionBuilder
The name of this score function.- Specified by:
getName
in classScoreFunctionBuilder<LinearDecayFunctionBuilder>
-
getDecayFunction
Description copied from class:DecayFunctionBuilder
Override this function if you want to produce your own scorer.- Specified by:
getDecayFunction
in classDecayFunctionBuilder<LinearDecayFunctionBuilder>
-