AggregationGroup

Types

Link copied to clipboard
class DateHistogram @InternalWowApi constructor(val field: QueryField<*>, val alias: String, val unit: AggregationDateUnit, val timeZone: String = "UTC", val dense: Boolean = false, val scope: AggregationGroupScope? = null) : AggregationGroup

Buckets the instant of field by unit in timeZone: a bucket's key is the epoch milliseconds of the instant at which the local unit period containing the record begins, in that period's own UTC offset (a week begins on Monday; a day, week, month, quarter or year at its first local midnight, or where a transition puts it). So a bucket never starts after its records, the hour a daylight-saving fall-back repeats is two buckets, and the hour a spring-forward skips is none.

Link copied to clipboard
class DatePart @InternalWowApi constructor(val field: QueryField<*>, val alias: String, val part: AggregationDatePart, val timeZone: String = "UTC", val dense: Boolean = false, val scope: AggregationGroupScope? = null) : AggregationGroup

Groups by one calendar part of the field's instant in timeZone, such as the weekday or the hour, so records from different days fall into one bucket. Keys are integers from AggregationDatePart's fixed domain; dense fills every key of that domain that has no records with the empty value of each metric.

Link copied to clipboard
class Histogram @InternalWowApi constructor(val field: QueryField<*>? = null, val alias: String, val interval: Double, val expression: AggregationExpression? = null, val scope: AggregationGroupScope? = null) : AggregationGroup

Buckets the numeric value of field, or of expression when the group names one instead.

Link copied to clipboard
class Terms @InternalWowApi constructor(val field: QueryField<*>? = null, val alias: String, val missingKey: String? = null, val expression: AggregationExpression? = null, val scope: AggregationGroupScope? = null) : AggregationGroup

Groups by the value of field, or of expression when the group names one instead.

Properties

Link copied to clipboard
abstract val alias: String
Link copied to clipboard
abstract val field: QueryField<*>?

The grouped field; null only for a TERMS or HISTOGRAM group whose input is an expression.

Link copied to clipboard

The computed input of a TERMS or HISTOGRAM group in place of its field, or null.

Link copied to clipboard

Where field is read when the query expands elements: null (the innermost element, relative to its container) or AggregationGroupScope.ROOT (a root field, by its absolute path), so a count of elements can be grouped by a field of the record they belong to, such as its creation day. Without elements both read the root.