public class InternalPercentiles extends InternalNumericMetricsAggregation.MultiValue implements Percentiles
Modifier and Type | Class and Description |
---|---|
static class |
InternalPercentiles.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 |
---|
InternalPercentiles(String name,
double[] percents,
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 |
percentile(double percent)
Return the value associated with the provided percentile.
|
String |
percentileAsString(double percent)
Return the value associated with the provided percentile 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 InternalPercentiles(String name, double[] percents, TDigestState state, boolean keyed, @Nullable ValueFormatter formatter)
public static void registerStreams()
public Iterator<Percentile> iterator()
iterator
in interface Iterable<Percentile>
public double percentile(double percent)
Percentiles
percentile
in interface Percentiles
public String percentileAsString(double percent)
Percentiles
percentileAsString
in interface Percentiles
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.