Class StupidBackoff

java.lang.Object
org.elasticsearch.search.suggest.phrase.SmoothingModel
org.elasticsearch.search.suggest.phrase.StupidBackoff
All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public final class StupidBackoff
extends SmoothingModel
A "stupid-backoff" smoothing model similar to Katz's Backoff. This model is used as the default if no model is configured.

See N-Gram Smoothing for details.

  • Nested Class Summary

    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 double DEFAULT_BACKOFF_DISCOUNT
    Default discount parameter for StupidBackoff smoothing
    static java.lang.String NAME  

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

    EMPTY_PARAMS
  • Constructor Summary

    Constructors 
    Constructor Description
    StupidBackoff​(double discount)
    Creates a Stupid-Backoff smoothing model.
    StupidBackoff​(StreamInput in)
    Read from a stream.
  • Method Summary

    Modifier and Type Method Description
    WordScorer.WordScorerFactory buildWordScorerFactory()  
    protected boolean doEquals​(SmoothingModel other)
    subtype specific implementation of "equals".
    protected int doHashCode()  
    static SmoothingModel fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)  
    double getDiscount()  
    java.lang.String getWriteableName()
    Returns the name of the writeable object
    protected org.elasticsearch.common.xcontent.XContentBuilder innerToXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class org.elasticsearch.search.suggest.phrase.SmoothingModel

    equals, hashCode, toXContent

    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