Module org.elasticsearch.server
Class LinearDecayFunctionBuilder
java.lang.Object
org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder<LinearDecayFunctionBuilder>
org.elasticsearch.index.query.functionscore.DecayFunctionBuilder<LinearDecayFunctionBuilder>
org.elasticsearch.index.query.functionscore.LinearDecayFunctionBuilder
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,ToXContent,ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
DecayFunctionBuilder.AbstractDistanceScoreFunctionNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DecayFunctionstatic final Stringstatic final ScoreFunctionParser<LinearDecayFunctionBuilder> Fields inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
DECAY, DEFAULT_DECAY, DEFAULT_MULTI_VALUE_MODE, OFFSET, ORIGIN, SCALEFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionLinearDecayFunctionBuilder(String fieldName, Object origin, Object scale, Object offset) LinearDecayFunctionBuilder(String fieldName, Object origin, Object scale, Object offset, double decay) Read from a stream. -
Method Summary
Modifier and TypeMethodDescriptionOverride this function if you want to produce your own scorer.The minimal version of the recipient this object can be sent to.getName()The name of this score function.protected voidvalidateDecay(double decay) Override this function if you have different validation rules per score functionMethods inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
doEquals, doHashCode, doToFunction, doWriteTo, doXContent, getFieldName, getFunctionBytes, getMultiValueMode, setMultiValueModeMethods inherited from class org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder
equals, getWeight, getWriteableName, hashCode, setWeight, toFunction, toXContent, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragmentMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
supportsVersion
-
Field Details
-
NAME
- See Also:
-
PARSER
-
LINEAR_DECAY_FUNCTION
-
-
Constructor Details
-
LinearDecayFunctionBuilder
-
LinearDecayFunctionBuilder
-
LinearDecayFunctionBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
validateDecay
protected void validateDecay(double decay) Description copied from class:DecayFunctionBuilderOverride this function if you have different validation rules per score function- Overrides:
validateDecayin classDecayFunctionBuilder<LinearDecayFunctionBuilder>
-
getName
Description copied from class:ScoreFunctionBuilderThe name of this score function.- Specified by:
getNamein classScoreFunctionBuilder<LinearDecayFunctionBuilder>
-
getDecayFunction
Description copied from class:DecayFunctionBuilderOverride this function if you want to produce your own scorer.- Specified by:
getDecayFunctionin classDecayFunctionBuilder<LinearDecayFunctionBuilder>
-
getMinimalSupportedVersion
Description copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to. SeeVersionedNamedWriteable.supportsVersion(TransportVersion)for the default serialization check.
-