public class InternalPercentileRanks extends InternalNumericMetricsAggregation.MultiValue implements PercentileRanks
| Modifier and Type | Class and Description |
|---|---|
static class |
InternalPercentileRanks.Iter |
InternalNumericMetricsAggregation.MultiValue, InternalNumericMetricsAggregation.SingleValueInternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.TypeNumericMetricsAggregation.MultiValue, NumericMetricsAggregation.SingleValueToXContent.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 |
valueFormatternameEMPTY_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) |
valueAsStringgetName, readSize, toXContent, writeSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameforEach, spliteratorpublic 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)
PercentileRankspercent in interface PercentileRankspublic String percentAsString(double value)
PercentileRankspercentAsString in interface PercentileRankspublic 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 InternalAggregationInternalAggregation.Type of this aggregationpublic double value(String name)
value in class InternalNumericMetricsAggregation.MultiValuepublic org.elasticsearch.search.aggregations.metrics.percentiles.AbstractInternalPercentiles reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregationreduce in class InternalAggregationpublic void readFrom(StreamInput in) throws IOException
IOExceptionpublic void writeTo(StreamOutput out) throws IOException
IOExceptionpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody in class InternalAggregationIOExceptionCopyright © 2009–2016. All rights reserved.