public class BucketHelpers extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BucketHelpers.GapPolicy
A gap policy determines how "holes" in a set of buckets should be handled.
|
Constructor and Description |
---|
BucketHelpers() |
Modifier and Type | Method and Description |
---|---|
static Double |
resolveBucketValue(InternalMultiBucketAggregation<?,? extends MultiBucketsAggregation.Bucket> agg,
MultiBucketsAggregation.Bucket bucket,
List<String> aggPathAsList,
BucketHelpers.GapPolicy gapPolicy) |
static Double |
resolveBucketValue(InternalMultiBucketAggregation<?,? extends MultiBucketsAggregation.Bucket> agg,
MultiBucketsAggregation.Bucket bucket,
String aggPath,
BucketHelpers.GapPolicy gapPolicy)
Given a path and a set of buckets, this method will return the value
inside the agg at that path.
|
public static Double resolveBucketValue(InternalMultiBucketAggregation<?,? extends MultiBucketsAggregation.Bucket> agg, MultiBucketsAggregation.Bucket bucket, String aggPath, BucketHelpers.GapPolicy gapPolicy)
agg
- A series of agg buckets in the form of a histogrambucket
- A specific bucket that a value needs to be extracted from.
This bucket should be present in the histo
parameteraggPath
- The path to a particular value that needs to be extracted.
This path should point to a metric inside the
bucket
gapPolicy
- The gap policy to apply if empty buckets are foundbucket
found at
aggPath
public static Double resolveBucketValue(InternalMultiBucketAggregation<?,? extends MultiBucketsAggregation.Bucket> agg, MultiBucketsAggregation.Bucket bucket, List<String> aggPathAsList, BucketHelpers.GapPolicy gapPolicy)
Copyright © 2009–2016. All rights reserved.