Class PercentageScore
- java.lang.Object
-
- org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic
-
- org.elasticsearch.search.aggregations.bucket.significant.heuristics.PercentageScore
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment
public class PercentageScore extends SignificanceHeuristic
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPercentageScore.PercentageScoreBuilder-
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 java.lang.StringNAME-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description PercentageScore()PercentageScore(StreamInput in)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)doublegetScore(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)Indicates the significance of a term in a sample by determining what percentage of all occurrences of a term are found in the sample.java.lang.StringgetWriteableName()Returns the name of the writeable objectinthashCode()static SignificanceHeuristicparse(XContentParser parser)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.search.aggregations.bucket.significant.heuristics.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 Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PercentageScore
public PercentageScore()
-
PercentageScore
public PercentageScore(StreamInput in)
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
java.io.IOException
-
getWriteableName
public java.lang.String getWriteableName()
Description copied from interface:NamedWriteableReturns the name of the writeable object
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
parse
public static SignificanceHeuristic parse(XContentParser parser) throws java.io.IOException, QueryShardException
- Throws:
java.io.IOExceptionQueryShardException
-
getScore
public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)Indicates the significance of a term in a sample by determining what percentage of all occurrences of a term are found in the sample.- Specified by:
getScorein classSignificanceHeuristic- Parameters:
subsetFreq- The frequency of the term in the selected samplesubsetSize- The size of the selected sample (typically number of docs)supersetFreq- The frequency of the term in the superset from which the sample was takensupersetSize- The size of the superset from which the sample was taken (typically number of docs)- Returns:
- a "significance" score
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-