NamedWriteable
, Writeable
, ToXContent
, ToXContentFragment
public class PercentageScore extends SignificanceHeuristic
Modifier and Type | Class | Description |
---|---|---|
static class |
PercentageScore.PercentageScoreBuilder |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
NAME |
EMPTY_PARAMS
Constructor | Description |
---|---|
PercentageScore() |
|
PercentageScore(StreamInput in) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
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.
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
static SignificanceHeuristic |
parse(XContentParser parser) |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
checkFrequencyValidity, rewrite, rewrite
isFragment
public static final java.lang.String NAME
public PercentageScore()
public PercentageScore(StreamInput in)
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
java.io.IOException
public java.lang.String getWriteableName()
NamedWriteable
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
public static SignificanceHeuristic parse(XContentParser parser) throws java.io.IOException, QueryShardException
java.io.IOException
QueryShardException
public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize)
getScore
in class SignificanceHeuristic
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)public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object