Class HistogramUnionState

java.lang.Object
org.elasticsearch.search.aggregations.metrics.HistogramUnionState
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.lucene.util.Accountable, Releasable

public class HistogramUnionState extends Object implements Releasable, org.apache.lucene.util.Accountable
A state for holding potentially mixed data of exponential histogram and T-Digests. If the data is not mixed, the querying methods will just delegate to ExponentialHistogramState or TDigestState as appropriate. Otherwise the T-Digest data will be converted to exponential histogram and will be merged with the existing exponential histogram data to serve queries. This conversion will happen lazily: All T-Digests will be merged with each other and all exponential histograms will be merged with each other first, to preserve accuracy as much as possible. Only when a query is made that requires both data types, the conversion will happen.