Class DecayFunctionBuilder<DFB extends DecayFunctionBuilder<DFB>>

java.lang.Object
org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder<DFB>
org.elasticsearch.index.query.functionscore.DecayFunctionBuilder<DFB>
All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment
Direct Known Subclasses:
ExponentialDecayFunctionBuilder, GaussDecayFunctionBuilder, LinearDecayFunctionBuilder

public abstract class DecayFunctionBuilder<DFB extends DecayFunctionBuilder<DFB>>
extends ScoreFunctionBuilder<DFB>
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  DecayFunctionBuilder.AbstractDistanceScoreFunction
    This is the base class for scoring a single field.

    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
    protected static java.lang.String DECAY  
    static double DEFAULT_DECAY  
    static MultiValueMode DEFAULT_MULTI_VALUE_MODE  
    protected static java.lang.String OFFSET  
    protected static java.lang.String ORIGIN  
    protected static java.lang.String SCALE  

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected DecayFunctionBuilder​(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset)
    Convenience constructor that converts its parameters into json to parse on the data nodes.
    protected DecayFunctionBuilder​(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset, double decay)
    Convenience constructor that converts its parameters into json to parse on the data nodes.
    protected DecayFunctionBuilder​(java.lang.String fieldName, BytesReference functionBytes)  
    protected DecayFunctionBuilder​(StreamInput in)
    Read from a stream.
  • Method Summary

    Modifier and Type Method Description
    protected boolean doEquals​(DFB functionBuilder)
    Check that two instances of the same subclass of ScoreFunctionBuilder are equal.
    protected int doHashCode()
    Hashcode for fields defined in this subclass of ScoreFunctionBuilder.
    protected ScoreFunction doToFunction​(SearchExecutionContext context)
    Build the Lucene ScoreFunction for this builder.
    protected void doWriteTo​(StreamOutput out)
    Write the subclass's components into the stream.
    void doXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
    Convert this subclass's data into XContent.
    protected abstract DecayFunction getDecayFunction()
    Override this function if you want to produce your own scorer.
    java.lang.String getFieldName()  
    BytesReference getFunctionBytes()  
    MultiValueMode getMultiValueMode()  
    DFB setMultiValueMode​(MultiValueMode multiValueMode)  

    Methods inherited from class org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder

    equals, getName, 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 Details

  • Constructor Details

    • DecayFunctionBuilder

      protected DecayFunctionBuilder​(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset)
      Convenience constructor that converts its parameters into json to parse on the data nodes.
    • DecayFunctionBuilder

      protected DecayFunctionBuilder​(java.lang.String fieldName, java.lang.Object origin, java.lang.Object scale, java.lang.Object offset, double decay)
      Convenience constructor that converts its parameters into json to parse on the data nodes.
    • DecayFunctionBuilder

      protected DecayFunctionBuilder​(java.lang.String fieldName, BytesReference functionBytes)
    • DecayFunctionBuilder

      protected DecayFunctionBuilder​(StreamInput in) throws java.io.IOException
      Read from a stream.
      Throws:
      java.io.IOException
  • Method Details