MetricSpec

enum class MetricSpec : Enum<MetricSpec>

The single specification of each aggregation metric type: its wire name (the enum name, equal to the JSON type), what it reads and with which capabilities, its result type, whether HAVING may compare it and what it costs. Admission, the entry gate, the descriptor and empty-group values read it, so a new metric type is added here and every exhaustive when over AggregationMetric fails to compile until handled.

Its constants are public: a storage names the metric types it orders one TERMS group by itself (AggregationSupport.termsTopN). What each one reads and costs is the core's.

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Arithmetic over the group's other metrics, computed per group.

Link copied to clipboard

The value on the group's earliest record by an order; storage sorts every group's records to find it.

Link copied to clipboard

The value on the group's latest record by an order; costs what FIRST does.

Types

Link copied to clipboard

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard

The cost of the metric type in general; cost refines it for one metric.

Link copied to clipboard

The capabilities a field input may be read with, the first one the field grants; empty when it reads none.

Link copied to clipboard

Whether a HAVING condition may compare the metric's value.

Link copied to clipboard
Link copied to clipboard

The capability the ordering field must grant, for a metric that picks one record of the group by an order; that field, like the input, must hold a single value per record.

Link copied to clipboard

Functions

Link copied to clipboard

The cost of metric: an expression input other than a bare field is computed per record; otherwise baseCost.