Class GaussDecayFunctionBuilder
- java.lang.Object
-
- org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder<DFB>
-
- org.elasticsearch.index.query.functionscore.DecayFunctionBuilder<GaussDecayFunctionBuilder>
-
- org.elasticsearch.index.query.functionscore.GaussDecayFunctionBuilder
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment
public class GaussDecayFunctionBuilder extends DecayFunctionBuilder<GaussDecayFunctionBuilder>
-
-
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
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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 ParseFieldFUNCTION_NAME_FIELDstatic DecayFunctionGAUSS_DECAY_FUNCTIONstatic java.lang.StringNAMEstatic ScoreFunctionParser<GaussDecayFunctionBuilder>PARSER-
Fields inherited from class org.elasticsearch.index.query.functionscore.DecayFunctionBuilder
DECAY, DEFAULT_DECAY, DEFAULT_MULTI_VALUE_MODE, OFFSET, ORIGIN, SCALE
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description GaussDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset)GaussDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset, double decay)GaussDecayFunctionBuilder(StreamInput in)Read from a stream.
-
Method Summary
Modifier and Type Method Description DecayFunctiongetDecayFunction()Override this function if you want to produce your own scorer.java.lang.StringgetName()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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
FUNCTION_NAME_FIELD
public static final ParseField FUNCTION_NAME_FIELD
-
PARSER
public static final ScoreFunctionParser<GaussDecayFunctionBuilder> PARSER
-
GAUSS_DECAY_FUNCTION
public static final DecayFunction GAUSS_DECAY_FUNCTION
-
-
Constructor Detail
-
GaussDecayFunctionBuilder
public GaussDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset)
-
GaussDecayFunctionBuilder
public GaussDecayFunctionBuilder(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset, double decay)
-
GaussDecayFunctionBuilder
public GaussDecayFunctionBuilder(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:ScoreFunctionBuilderThe name of this score function.- Specified by:
getNamein classScoreFunctionBuilder<GaussDecayFunctionBuilder>
-
getDecayFunction
public DecayFunction getDecayFunction()
Description copied from class:DecayFunctionBuilderOverride this function if you want to produce your own scorer.- Specified by:
getDecayFunctionin classDecayFunctionBuilder<GaussDecayFunctionBuilder>
-
-