java.lang.Object
org.elasticsearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic
org.elasticsearch.search.aggregations.bucket.terms.heuristic.JLHScore
All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class JLHScore extends SignificanceHeuristic
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    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 String
     
    static org.elasticsearch.common.xcontent.ObjectParser<JLHScore,​Void>
     

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

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Read from a stream.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object obj)
     
    double
    getScore​(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)
    Calculates the significance of a term in a sample against a background of normal distributions by comparing the changes in frequency.
    Returns the name of the writeable object
    int
     
    org.elasticsearch.common.xcontent.XContentBuilder
    toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     
    void
    Write this into the StreamOutput.

    Methods inherited from class org.elasticsearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic

    checkFrequencyValidity, rewrite, rewrite

    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

    • JLHScore

      public JLHScore()
    • JLHScore

      public JLHScore(StreamInput in)
      Read from a stream.
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
      Description copied from interface: NamedWriteable
      Returns the name of the writeable object
    • getScore

      public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)
      Calculates the significance of a term in a sample against a background of normal distributions by comparing the changes in frequency. This is the heart of the significant terms feature.
      Specified by:
      getScore in class SignificanceHeuristic
      Parameters:
      subsetFreq - The frequency of the term in the selected sample
      subsetSize - The size of the selected sample (typically number of docs)
      supersetFreq - The frequency of the term in the superset from which the sample was taken
      supersetSize - The size of the superset from which the sample was taken (typically number of docs)
      Returns:
      a "significance" score
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Throws:
      IOException
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object