public class InternalPercentileRanks extends InternalNumericMetricsAggregation.MultiValue implements PercentileRanks
Modifier and Type | Class and Description |
---|---|
static class |
InternalPercentileRanks.Iter |
InternalNumericMetricsAggregation.MultiValue, InternalNumericMetricsAggregation.SingleValue
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
NumericMetricsAggregation.MultiValue, NumericMetricsAggregation.SingleValue
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected double[] |
keys |
protected TDigestState |
state |
static AggregationStreams.Stream |
STREAM |
static InternalAggregation.Type |
TYPE |
valueFormatter
name
EMPTY_PARAMS
Constructor and Description |
---|
InternalPercentileRanks(String name,
double[] cdfValues,
TDigestState state,
boolean keyed,
ValueFormatter formatter) |
Modifier and Type | Method and Description |
---|---|
protected org.elasticsearch.search.aggregations.metrics.percentiles.AbstractInternalPercentiles |
createReduced(String name,
double[] keys,
TDigestState merged,
boolean keyed) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
Iterator<Percentile> |
iterator() |
double |
percent(double value)
Return the percentile for the given value.
|
String |
percentAsString(double value)
Return the percentile for the given value as a String.
|
void |
readFrom(StreamInput in) |
org.elasticsearch.search.aggregations.metrics.percentiles.AbstractInternalPercentiles |
reduce(InternalAggregation.ReduceContext reduceContext)
Reduces the given addAggregation to a single one and returns it.
|
static void |
registerStreams() |
InternalAggregation.Type |
type() |
double |
value(double key) |
double |
value(String name) |
void |
writeTo(StreamOutput out) |
valueAsString
getName, readSize, toXContent, writeSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
forEach, spliterator
public static final InternalAggregation.Type TYPE
public static final AggregationStreams.Stream STREAM
protected double[] keys
protected TDigestState state
public InternalPercentileRanks(String name, double[] cdfValues, TDigestState state, boolean keyed, @Nullable ValueFormatter formatter)
public static void registerStreams()
public Iterator<Percentile> iterator()
iterator
in interface Iterable<Percentile>
public double percent(double value)
PercentileRanks
percent
in interface PercentileRanks
public String percentAsString(double value)
PercentileRanks
percentAsString
in interface PercentileRanks
public double value(double key)
protected org.elasticsearch.search.aggregations.metrics.percentiles.AbstractInternalPercentiles createReduced(String name, double[] keys, TDigestState merged, boolean keyed)
public InternalAggregation.Type type()
type
in class InternalAggregation
InternalAggregation.Type
of this aggregationpublic double value(String name)
value
in class InternalNumericMetricsAggregation.MultiValue
public org.elasticsearch.search.aggregations.metrics.percentiles.AbstractInternalPercentiles reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregation
reduce
in class InternalAggregation
public void readFrom(StreamInput in) throws IOException
IOException
public void writeTo(StreamOutput out) throws IOException
IOException
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody
in class InternalAggregation
IOException
Copyright © 2009–2015. All rights reserved.