Interface HistogramFactory
-
- All Known Implementing Classes:
InternalAutoDateHistogram
,InternalDateHistogram
,InternalHistogram
public interface HistogramFactory
Implemented by histogram aggregations and used by pipeline aggregations to insert buckets.
-
-
Method Summary
Modifier and Type Method Description InternalAggregation
createAggregation(java.util.List<MultiBucketsAggregation.Bucket> buckets)
Create anInternalAggregation
object that wraps the given buckets.MultiBucketsAggregation.Bucket
createBucket(java.lang.Number key, long docCount, InternalAggregations aggregations)
Create aMultiBucketsAggregation.Bucket
object that wraps the given key, document count and aggregations.java.lang.Number
getKey(MultiBucketsAggregation.Bucket bucket)
Get the key for the given bucket.java.lang.Number
nextKey(java.lang.Number key)
Given a key returned bygetKey(org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket)
, compute the lowest key that is greater than it.
-
-
-
Method Detail
-
getKey
java.lang.Number getKey(MultiBucketsAggregation.Bucket bucket)
Get the key for the given bucket. Date histograms must return the number of millis since Epoch of the bucket key while numeric histograms must return the double value of the key.
-
nextKey
java.lang.Number nextKey(java.lang.Number key)
Given a key returned bygetKey(org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation.Bucket)
, compute the lowest key that is greater than it.
-
createAggregation
InternalAggregation createAggregation(java.util.List<MultiBucketsAggregation.Bucket> buckets)
Create anInternalAggregation
object that wraps the given buckets.
-
createBucket
MultiBucketsAggregation.Bucket createBucket(java.lang.Number key, long docCount, InternalAggregations aggregations)
Create aMultiBucketsAggregation.Bucket
object that wraps the given key, document count and aggregations.
-
-