DateHistogram

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.

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val alias: String
Link copied to clipboard
Link copied to clipboard
open override val field: QueryField<*>

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

Link copied to clipboard
open override val scope: AggregationGroupScope?

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.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(field: QueryField<*> = this.field, alias: String = this.alias, unit: AggregationDateUnit = this.unit, timeZone: String = this.timeZone, dense: Boolean = this.dense, scope: AggregationGroupScope? = this.scope): AggregationGroup.DateHistogram

This DateHistogram with the given values replaced; for Wow's own query rewriting.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String