### ApproxHistogram aggregator This aggregator is based on [http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf](http://jmlr.org/papers/volume11/ben-haim10a/ben-haim10a.pdf) to compute approximate histograms. To use this feature, an "approxHistogram" aggregator must be included at indexing time. The ingestion aggregator can only apply to numeric values. To query for results, an "approxHistogramFold" aggregator must be included in the query. ```json { "type" : "approxHistogram(ingestion), approxHistogramFold(query)", "name" : , "fieldName" : , "resolution" : , "numBuckets" : , "lowerLimit" : , "upperLimit" : } ``` |Property|Description|Default| |--------|-----------|-------| |`resolution`|Number of centroids (data points) to store. The higher the resolution, the more accurate results are, but the slower computation will be.|50| |`numBuckets`|Number of output buckets for the resulting histogram.|7| |`lowerLimit`/`upperLimit`|Restrict the approximation to the given range. The values outside this range will be aggregated into two centroids. Counts of values outside this range are still maintained. |-INF/+INF| ### Approximate Histogram post-aggregators Post-aggregators used to transform opaque approximate histogram objects into actual histogram representations, and to compute various distribution metrics. #### equal buckets post-aggregator Computes a visual representation of the approximate histogram with a given number of equal-sized bins ```json { "type" : "equalBuckets", "name" : , "fieldName" : , "numBuckets" : } ``` #### buckets post-aggregator Computes a visual representation given an initial breakpoint, offset, and a bucket size. ```json { "type" : "buckets", "name" : , "fieldName" : , "bucketSize" : , "offset" : } ``` #### custom buckets post-aggregator Computes a visual representation of the approximate histogram with bins laid out according to the given breaks ```json { "type" : "customBuckets", "name" : , "fieldName" : , "breaks" : [ , , ... ] } ``` #### min post-aggregator Returns the minimum value of the underlying approximate histogram aggregator ```json { "type" : "min", "name" : , "fieldName" : } ``` #### max post-aggregator Returns the maximum value of the underlying approximate histogram aggregator ```json { "type" : "max", "name" : , "fieldName" : } ``` #### quantile post-aggregator Computes a single quantile based on the underlying approximate histogram aggregator ```json { "type" : "quantile", "name" : , "fieldName" : , "probability" : } ``` #### quantiles post-aggregator Computes an array of quantiles based on the underlying approximate histogram aggregator ```json { "type" : "quantiles", "name" : , "fieldName" : , "probabilities" : [ , , ... ] } ```