From 807c425948d03219666e2b96b788afec4a94e196 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 7 Oct 2025 14:23:56 +0200 Subject: [PATCH 1/3] change point aggregate container --- .../_types/aggregations/Aggregate.ts | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/specification/_types/aggregations/Aggregate.ts b/specification/_types/aggregations/Aggregate.ts index 38b9c7b5e2..5f72de2ad9 100644 --- a/specification/_types/aggregations/Aggregate.ts +++ b/specification/_types/aggregations/Aggregate.ts @@ -396,51 +396,44 @@ export class ChangePointBucket extends MultiBucketBase { } /** - * @variants typed_keys_quirk + * @variants container */ -export type ChangeType = - | Dip - | DistributionChange - | Indeterminable - | NonStationary - | Spike - | Stationary - | StepChange - | TrendChange +export class ChangeType { + dip?: Dip + distribution_change?: DistributionChange + indeterminable?: Indeterminable + non_stationary?: NonStationary + spike?: Spike + stationary?: Stationary + step_change?: StepChange + trend_change?: TrendChange +} export class AbstractChangePoint { p_value: double change_point: integer } -/** @variant name=dip */ export class Dip extends AbstractChangePoint {} -/** @variant name=distribution_change */ export class DistributionChange extends AbstractChangePoint {} -/** @variant name=spike */ export class Spike extends AbstractChangePoint {} -/** @variant name=step_change */ export class StepChange extends AbstractChangePoint {} -/** @variant name=indeterminable */ export class Indeterminable { reason: string } -/** @variant name=non_stationary */ export class NonStationary { p_value: double r_value: double trend: string } -/** @variant name=stationary */ export class Stationary {} -/** @variant name=trend_change */ export class TrendChange { p_value: double r_value: double From 1f07daa184c12348da3e8091f12fed60e855e591 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 7 Oct 2025 14:51:49 +0200 Subject: [PATCH 2/3] fix extends --- .../_types/aggregations/Aggregate.ts | 790 ++++++++++-------- 1 file changed, 421 insertions(+), 369 deletions(-) diff --git a/specification/_types/aggregations/Aggregate.ts b/specification/_types/aggregations/Aggregate.ts index 5f72de2ad9..7bc93208d4 100644 --- a/specification/_types/aggregations/Aggregate.ts +++ b/specification/_types/aggregations/Aggregate.ts @@ -17,25 +17,25 @@ * under the License. */ -import { CompositeAggregateKey } from '@_types/aggregations/bucket' -import { AggregateName, Field, FieldValue, Metadata } from '@_types/common' +import {CompositeAggregateKey} from '@_types/aggregations/bucket' +import {AggregateName, Field, FieldValue, Metadata} from '@_types/common' import { - CartesianPoint, - GeoBounds, - GeoHash, - GeoHexCell, - GeoLine, - GeoLocation, - GeoTile, - TopLeftBottomRightGeoBounds + CartesianPoint, + GeoBounds, + GeoHash, + GeoHexCell, + GeoLine, + GeoLocation, + GeoTile, + TopLeftBottomRightGeoBounds } from '@_types/Geo' -import { double, integer, long } from '@_types/Numeric' -import { DurationLarge, EpochTime, UnitMillis } from '@_types/Time' -import { HitsMetadata } from '@global/search/_types/hits' -import { AdditionalProperties } from '@spec_utils/behaviors' -import { Dictionary } from '@spec_utils/Dictionary' -import { UserDefinedValue } from '@spec_utils/UserDefinedValue' -import { Void } from '@spec_utils/VoidValue' +import {double, integer, long} from '@_types/Numeric' +import {DurationLarge, EpochTime, UnitMillis} from '@_types/Time' +import {HitsMetadata} from '@global/search/_types/hits' +import {AdditionalProperties} from '@spec_utils/behaviors' +import {Dictionary} from '@spec_utils/Dictionary' +import {UserDefinedValue} from '@spec_utils/UserDefinedValue' +import {Void} from '@spec_utils/VoidValue' /** * @variants typed_keys_quirk @@ -43,91 +43,91 @@ import { Void } from '@spec_utils/VoidValue' * @ext_doc_id search-aggregations */ export type Aggregate = - | CardinalityAggregate - // Digests - | HdrPercentilesAggregate - | HdrPercentileRanksAggregate - | TDigestPercentilesAggregate - | TDigestPercentileRanksAggregate - | PercentilesBucketAggregate - // Single value - | MedianAbsoluteDeviationAggregate - | MinAggregate - | MaxAggregate - | SumAggregate - | AvgAggregate - | WeightedAvgAggregate - | ValueCountAggregate - | SimpleValueAggregate - | DerivativeAggregate - | BucketMetricValueAggregate - | ChangePointAggregate - // Multi value - | StatsAggregate - | StatsBucketAggregate - | ExtendedStatsAggregate - | ExtendedStatsBucketAggregate - | CartesianBoundsAggregate - | CartesianCentroidAggregate - // Geo - | GeoBoundsAggregate - | GeoCentroidAggregate - // Histograms - | HistogramAggregate - | DateHistogramAggregate - | AutoDateHistogramAggregate - | VariableWidthHistogramAggregate - // Terms - | StringTermsAggregate - | LongTermsAggregate - | DoubleTermsAggregate - | UnmappedTermsAggregate - | LongRareTermsAggregate - | StringRareTermsAggregate - | UnmappedRareTermsAggregate - | MultiTermsAggregate - // Single bucket - | MissingAggregate - | NestedAggregate - | ReverseNestedAggregate - | GlobalAggregate - | FilterAggregate - | ChildrenAggregate - | ParentAggregate - | SamplerAggregate - | UnmappedSamplerAggregate - // Geo grid - | GeoHashGridAggregate - | GeoTileGridAggregate - | GeoHexGridAggregate - // Range - | RangeAggregate - | DateRangeAggregate - | GeoDistanceAggregate - | IpRangeAggregate - | IpPrefixAggregate - // Other multi-bucket - | FiltersAggregate - | AdjacencyMatrixAggregate - | SignificantLongTermsAggregate - | SignificantStringTermsAggregate - | UnmappedSignificantTermsAggregate - | CompositeAggregate - | FrequentItemSetsAggregate - | TimeSeriesAggregate - // - | ScriptedMetricAggregate - | TopHitsAggregate - | InferenceAggregate - // Analytics - | StringStatsAggregate - | BoxPlotAggregate - | TopMetricsAggregate - | TTestAggregate - | RateAggregate - | CumulativeCardinalityAggregate - | MatrixStatsAggregate - | GeoLineAggregate + | CardinalityAggregate + // Digests + | HdrPercentilesAggregate + | HdrPercentileRanksAggregate + | TDigestPercentilesAggregate + | TDigestPercentileRanksAggregate + | PercentilesBucketAggregate + // Single value + | MedianAbsoluteDeviationAggregate + | MinAggregate + | MaxAggregate + | SumAggregate + | AvgAggregate + | WeightedAvgAggregate + | ValueCountAggregate + | SimpleValueAggregate + | DerivativeAggregate + | BucketMetricValueAggregate + | ChangePointAggregate + // Multi value + | StatsAggregate + | StatsBucketAggregate + | ExtendedStatsAggregate + | ExtendedStatsBucketAggregate + | CartesianBoundsAggregate + | CartesianCentroidAggregate + // Geo + | GeoBoundsAggregate + | GeoCentroidAggregate + // Histograms + | HistogramAggregate + | DateHistogramAggregate + | AutoDateHistogramAggregate + | VariableWidthHistogramAggregate + // Terms + | StringTermsAggregate + | LongTermsAggregate + | DoubleTermsAggregate + | UnmappedTermsAggregate + | LongRareTermsAggregate + | StringRareTermsAggregate + | UnmappedRareTermsAggregate + | MultiTermsAggregate + // Single bucket + | MissingAggregate + | NestedAggregate + | ReverseNestedAggregate + | GlobalAggregate + | FilterAggregate + | ChildrenAggregate + | ParentAggregate + | SamplerAggregate + | UnmappedSamplerAggregate + // Geo grid + | GeoHashGridAggregate + | GeoTileGridAggregate + | GeoHexGridAggregate + // Range + | RangeAggregate + | DateRangeAggregate + | GeoDistanceAggregate + | IpRangeAggregate + | IpPrefixAggregate + // Other multi-bucket + | FiltersAggregate + | AdjacencyMatrixAggregate + | SignificantLongTermsAggregate + | SignificantStringTermsAggregate + | UnmappedSignificantTermsAggregate + | CompositeAggregate + | FrequentItemSetsAggregate + | TimeSeriesAggregate + // + | ScriptedMetricAggregate + | TopHitsAggregate + | InferenceAggregate + // Analytics + | StringStatsAggregate + | BoxPlotAggregate + | TopMetricsAggregate + | TTestAggregate + | RateAggregate + | CumulativeCardinalityAggregate + | MatrixStatsAggregate + | GeoLineAggregate // Aggregations are defined in the ES code base in two ways: // - in SearchModule.registerAggregations() @@ -139,19 +139,19 @@ export type Aggregate = // Exceptions to this scheme exist and are indicated in the relevant aggregates export class AggregateBase { - meta?: Metadata + meta?: Metadata } /** @variant name=cardinality */ export class CardinalityAggregate extends AggregateBase { - value: long + value: long } //----- Percentiles // ES: AbstractInternalHDRPercentiles, AbstractInternalTDigestPercentiles, InternalPercentilesBucket export class PercentilesAggregateBase extends AggregateBase { - values: Percentiles + values: Percentiles } /** @codegen_names keyed, array */ @@ -165,96 +165,109 @@ type Percentiles = KeyedPercentiles | Array type KeyedPercentiles = Dictionary export class ArrayPercentilesItem { - key: double - value: double | null - value_as_string?: string + key: double + value: double | null + value_as_string?: string } /** @variant name=hdr_percentiles */ -export class HdrPercentilesAggregate extends PercentilesAggregateBase {} +export class HdrPercentilesAggregate extends PercentilesAggregateBase { +} /** @variant name=hdr_percentile_ranks */ -export class HdrPercentileRanksAggregate extends PercentilesAggregateBase {} +export class HdrPercentileRanksAggregate extends PercentilesAggregateBase { +} /** @variant name=tdigest_percentiles */ -export class TDigestPercentilesAggregate extends PercentilesAggregateBase {} +export class TDigestPercentilesAggregate extends PercentilesAggregateBase { +} /** @variant name=tdigest_percentile_ranks */ -export class TDigestPercentileRanksAggregate extends PercentilesAggregateBase {} +export class TDigestPercentileRanksAggregate extends PercentilesAggregateBase { +} /** @variant name=percentiles_bucket */ -export class PercentilesBucketAggregate extends PercentilesAggregateBase {} +export class PercentilesBucketAggregate extends PercentilesAggregateBase { +} //----- Single value export class SingleMetricAggregateBase extends AggregateBase { - // HLRC: ParsedSingleValueNumericMetricsAggregation - // ES: InternalNumericMetricsAggregation.SingleValue - /** - * The metric value. A missing value generally means that there was no data to aggregate, - * unless specified otherwise. - */ - value: double | null - value_as_string?: string + // HLRC: ParsedSingleValueNumericMetricsAggregation + // ES: InternalNumericMetricsAggregation.SingleValue + /** + * The metric value. A missing value generally means that there was no data to aggregate, + * unless specified otherwise. + */ + value: double | null + value_as_string?: string } /** @variant name=median_absolute_deviation */ -export class MedianAbsoluteDeviationAggregate extends SingleMetricAggregateBase {} +export class MedianAbsoluteDeviationAggregate extends SingleMetricAggregateBase { +} /** * @variant name=min * @ext_doc_id search-aggregations-metrics-min-aggregation */ -export class MinAggregate extends SingleMetricAggregateBase {} +export class MinAggregate extends SingleMetricAggregateBase { +} /** * @variant name=max * @ext_doc_id search-aggregations-metrics-max-aggregation */ -export class MaxAggregate extends SingleMetricAggregateBase {} +export class MaxAggregate extends SingleMetricAggregateBase { +} /** * Sum aggregation result. `value` is always present and is zero if there were no values to process. * @variant name=sum * @ext_doc_id search-aggregations-metrics-sum-aggregation */ -export class SumAggregate extends SingleMetricAggregateBase {} +export class SumAggregate extends SingleMetricAggregateBase { +} /** * @variant name=avg * @ext_doc_id search-aggregations-metrics-avg-aggregation */ -export class AvgAggregate extends SingleMetricAggregateBase {} +export class AvgAggregate extends SingleMetricAggregateBase { +} /** * Weighted average aggregation result. `value` is missing if the weight was set to zero. * @variant name=weighted_avg * @ext_doc_id search-aggregations-metrics-weight-avg-aggregation */ -export class WeightedAvgAggregate extends SingleMetricAggregateBase {} +export class WeightedAvgAggregate extends SingleMetricAggregateBase { +} /** * Value count aggregation result. `value` is always present. * @variant name=value_count * @ext_doc_id search-aggregations-metrics-valuecount-aggregation */ -export class ValueCountAggregate extends SingleMetricAggregateBase {} +export class ValueCountAggregate extends SingleMetricAggregateBase { +} /** @variant name=simple_value */ -export class SimpleValueAggregate extends SingleMetricAggregateBase {} +export class SimpleValueAggregate extends SingleMetricAggregateBase { +} /** * @variant name=derivative * @ext_doc_id search-aggregations-pipeline-derivative-aggregation */ export class DerivativeAggregate extends SingleMetricAggregateBase { - normalized_value?: double - normalized_value_as_string?: string + normalized_value?: double + normalized_value_as_string?: string } /** @variant name=bucket_metric_value */ export class BucketMetricValueAggregate extends SingleMetricAggregateBase { - keys: string[] + keys: string[] } //----- Multi value @@ -266,39 +279,40 @@ export class BucketMetricValueAggregate extends SingleMetricAggregateBase { * @ext_doc_id search-aggregations-metrics-stats-aggregation */ export class StatsAggregate extends AggregateBase { - count: long - min: double | null - max: double | null - avg: double | null - sum: double - min_as_string?: string - max_as_string?: string - avg_as_string?: string - sum_as_string?: string + count: long + min: double | null + max: double | null + avg: double | null + sum: double + min_as_string?: string + max_as_string?: string + avg_as_string?: string + sum_as_string?: string } /** * @variant name=stats_bucket * @ext_doc_id search-aggregations-pipeline-stats-bucket-aggregation */ -export class StatsBucketAggregate extends StatsAggregate {} +export class StatsBucketAggregate extends StatsAggregate { +} export class StandardDeviationBounds { - upper: double | null - lower: double | null - upper_population: double | null - lower_population: double | null - upper_sampling: double | null - lower_sampling: double | null + upper: double | null + lower: double | null + upper_population: double | null + lower_population: double | null + upper_sampling: double | null + lower_sampling: double | null } export class StandardDeviationBoundsAsString { - upper: string - lower: string - upper_population: string - lower_population: string - upper_sampling: string - lower_sampling: string + upper: string + lower: string + upper_population: string + lower_population: string + upper_sampling: string + lower_sampling: string } /** @@ -306,36 +320,37 @@ export class StandardDeviationBoundsAsString { * @ext_doc_id search-aggregations-metrics-extendedstats-aggregation */ export class ExtendedStatsAggregate extends StatsAggregate { - sum_of_squares: double | null - variance: double | null - variance_population: double | null - variance_sampling: double | null - std_deviation: double | null - std_deviation_population: double | null - std_deviation_sampling: double | null - // Always sent (see InternalExtendedStats), but semantically it's useless if std_deviation is null - std_deviation_bounds?: StandardDeviationBounds - - sum_of_squares_as_string?: string - variance_as_string?: string - variance_population_as_string?: string - variance_sampling_as_string?: string - std_deviation_as_string?: string - std_deviation_bounds_as_string?: StandardDeviationBoundsAsString + sum_of_squares: double | null + variance: double | null + variance_population: double | null + variance_sampling: double | null + std_deviation: double | null + std_deviation_population: double | null + std_deviation_sampling: double | null + // Always sent (see InternalExtendedStats), but semantically it's useless if std_deviation is null + std_deviation_bounds?: StandardDeviationBounds + + sum_of_squares_as_string?: string + variance_as_string?: string + variance_population_as_string?: string + variance_sampling_as_string?: string + std_deviation_as_string?: string + std_deviation_bounds_as_string?: StandardDeviationBoundsAsString } /** @variant name=extended_stats_bucket */ -export class ExtendedStatsBucketAggregate extends ExtendedStatsAggregate {} +export class ExtendedStatsBucketAggregate extends ExtendedStatsAggregate { +} /** @variant name=cartesian_bounds */ export class CartesianBoundsAggregate extends AggregateBase { - bounds?: TopLeftBottomRightGeoBounds + bounds?: TopLeftBottomRightGeoBounds } /** @variant name=cartesian_centroid */ export class CartesianCentroidAggregate extends AggregateBase { - count: long - location?: CartesianPoint + count: long + location?: CartesianPoint } //----- Geo @@ -345,7 +360,7 @@ export class CartesianCentroidAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-geobounds-aggregation */ export class GeoBoundsAggregate extends AggregateBase { - bounds?: GeoBounds + bounds?: GeoBounds } /** @@ -353,8 +368,8 @@ export class GeoBoundsAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-geocentroid-aggregation */ export class GeoCentroidAggregate extends AggregateBase { - count: long - location?: GeoLocation + count: long + location?: GeoLocation } //----- Histograms @@ -371,7 +386,7 @@ export class GeoCentroidAggregate extends AggregateBase { export type Buckets = Dictionary | Array export class MultiBucketAggregateBase extends AggregateBase { - buckets: Buckets + buckets: Buckets } /** @@ -380,85 +395,91 @@ export class MultiBucketAggregateBase extends AggregateBase { * @behavior_meta AdditionalProperties fieldname=aggregations description="Nested aggregations" */ export class MultiBucketBase - implements AdditionalProperties -{ - doc_count: long + implements AdditionalProperties { + doc_count: long } /** @variant name=change_point */ -export class ChangePointAggregate extends MultiBucketAggregateBase { - type: ChangeType - bucket?: ChangePointBucket +export class ChangePointAggregate extends AggregateBase { + type: ChangeType + bucket?: ChangePointBucket } export class ChangePointBucket extends MultiBucketBase { - key: FieldValue + key: FieldValue } /** * @variants container */ export class ChangeType { - dip?: Dip - distribution_change?: DistributionChange - indeterminable?: Indeterminable - non_stationary?: NonStationary - spike?: Spike - stationary?: Stationary - step_change?: StepChange - trend_change?: TrendChange + dip?: Dip + distribution_change?: DistributionChange + indeterminable?: Indeterminable + non_stationary?: NonStationary + spike?: Spike + stationary?: Stationary + step_change?: StepChange + trend_change?: TrendChange } export class AbstractChangePoint { - p_value: double - change_point: integer + p_value: double + change_point: integer } -export class Dip extends AbstractChangePoint {} +export class Dip extends AbstractChangePoint { +} -export class DistributionChange extends AbstractChangePoint {} +export class DistributionChange extends AbstractChangePoint { +} -export class Spike extends AbstractChangePoint {} +export class Spike extends AbstractChangePoint { +} -export class StepChange extends AbstractChangePoint {} +export class StepChange extends AbstractChangePoint { +} export class Indeterminable { - reason: string + reason: string } export class NonStationary { - p_value: double - r_value: double - trend: string + p_value: double + r_value: double + trend: string } -export class Stationary {} +export class Stationary { +} export class TrendChange { - p_value: double - r_value: double - change_point: integer + p_value: double + r_value: double + change_point: integer } /** * @variant name=histogram * @ext_doc_id search-aggregations-bucket-histogram-aggregation */ -export class HistogramAggregate extends MultiBucketAggregateBase {} +export class HistogramAggregate extends MultiBucketAggregateBase { +} export class HistogramBucket extends MultiBucketBase { - key_as_string?: string - key: double + key_as_string?: string + key: double } /** @variant name=date_histogram * @ext_doc_id search-aggregations-bucket-datehistogram-aggregation */ -export class DateHistogramAggregate extends MultiBucketAggregateBase {} +export class DateHistogramAggregate extends MultiBucketAggregateBase { +} export class DateHistogramBucket extends MultiBucketBase { - key_as_string?: string - key: EpochTime + key_as_string?: string + key: EpochTime } /** @@ -467,29 +488,30 @@ export class DateHistogramBucket extends MultiBucketBase { */ // Note: no keyed variant in `InternalAutoDateHistogram` export class AutoDateHistogramAggregate extends MultiBucketAggregateBase { - interval: DurationLarge + interval: DurationLarge } /** @variant name=variable_width_histogram */ // Note: no keyed variant in `InternalVariableWidthHistogram` -export class VariableWidthHistogramAggregate extends MultiBucketAggregateBase {} +export class VariableWidthHistogramAggregate extends MultiBucketAggregateBase { +} export class VariableWidthHistogramBucket extends MultiBucketBase { - min: double - key: double - max: double - min_as_string?: string - key_as_string?: string - max_as_string?: string + min: double + key: double + max: double + min_as_string?: string + key_as_string?: string + max_as_string?: string } //----- Terms export class TermsAggregateBase< - TBucket + TBucket > extends MultiBucketAggregateBase { - doc_count_error_upper_bound?: long - sum_other_doc_count?: long + doc_count_error_upper_bound?: long + sum_other_doc_count?: long } /** @@ -497,14 +519,15 @@ export class TermsAggregateBase< * @variant name=sterms */ // ES: StringTerms -export class StringTermsAggregate extends TermsAggregateBase {} +export class StringTermsAggregate extends TermsAggregateBase { +} export class TermsBucketBase extends MultiBucketBase { - doc_count_error_upper_bound?: long + doc_count_error_upper_bound?: long } export class StringTermsBucket extends TermsBucketBase { - key: FieldValue + key: FieldValue } /** @@ -512,11 +535,12 @@ export class StringTermsBucket extends TermsBucketBase { * @variant name=lterms */ // ES: LongTerms -export class LongTermsAggregate extends TermsAggregateBase {} +export class LongTermsAggregate extends TermsAggregateBase { +} export class LongTermsBucket extends TermsBucketBase { - key: long - key_as_string?: string + key: long + key_as_string?: string } /** @@ -524,11 +548,12 @@ export class LongTermsBucket extends TermsBucketBase { * @variant name=dterms */ // ES: DoubleTerms -export class DoubleTermsAggregate extends TermsAggregateBase {} +export class DoubleTermsAggregate extends TermsAggregateBase { +} export class DoubleTermsBucket extends TermsBucketBase { - key: double - key_as_string?: string + key: double + key_as_string?: string } /** @@ -537,28 +562,31 @@ export class DoubleTermsBucket extends TermsBucketBase { */ // ES: UnmappedTerms // Since the buckets array is present but always empty, we use `Void` as the bucket type. -export class UnmappedTermsAggregate extends TermsAggregateBase {} +export class UnmappedTermsAggregate extends TermsAggregateBase { +} /** * Result of the `rare_terms` aggregation when the field is some kind of whole number like a integer, long, or a date. * @variant name=lrareterms */ // ES: LongRareTerms -export class LongRareTermsAggregate extends MultiBucketAggregateBase {} +export class LongRareTermsAggregate extends MultiBucketAggregateBase { +} export class LongRareTermsBucket extends MultiBucketBase { - key: long - key_as_string?: string + key: long + key_as_string?: string } /** * Result of the `rare_terms` aggregation when the field is a string. * @variant name=srareterms */ -export class StringRareTermsAggregate extends MultiBucketAggregateBase {} +export class StringRareTermsAggregate extends MultiBucketAggregateBase { +} export class StringRareTermsBucket extends MultiBucketBase { - key: string + key: string } /** @@ -567,19 +595,21 @@ export class StringRareTermsBucket extends MultiBucketBase { */ // ES: UnmappedRareTerms // Since the buckets array is present but always empty, we use `Void` as the bucket type. -export class UnmappedRareTermsAggregate extends MultiBucketAggregateBase {} +export class UnmappedRareTermsAggregate extends MultiBucketAggregateBase { +} /** * @variant name=multi_terms * @ext_doc_id search-aggregations-bucket-multi-terms-aggregation */ // Note: no keyed variant -export class MultiTermsAggregate extends TermsAggregateBase {} +export class MultiTermsAggregate extends TermsAggregateBase { +} export class MultiTermsBucket extends MultiBucketBase { - key: Array - key_as_string?: string - doc_count_error_upper_bound?: long + key: Array + key_as_string?: string + doc_count_error_upper_bound?: long } //----- Single bucket @@ -590,56 +620,63 @@ export class MultiTermsBucket extends MultiBucketBase { * @behavior_meta AdditionalProperties fieldname=aggregations description="Nested aggregations" */ export class SingleBucketAggregateBase - extends AggregateBase - implements AdditionalProperties -{ - doc_count: long + extends AggregateBase + implements AdditionalProperties { + doc_count: long } /** * @variant name=missing * @ext_doc_id search-aggregations-bucket-missing-aggregation */ -export class MissingAggregate extends SingleBucketAggregateBase {} +export class MissingAggregate extends SingleBucketAggregateBase { +} /** * @variant name=nested * @ext_doc_id search-aggregations-bucket-nested-aggregation */ -export class NestedAggregate extends SingleBucketAggregateBase {} +export class NestedAggregate extends SingleBucketAggregateBase { +} /** * @variant name=reverse_nested * @ext_doc_id search-aggregations-bucket-reverse-nested-aggregation */ -export class ReverseNestedAggregate extends SingleBucketAggregateBase {} +export class ReverseNestedAggregate extends SingleBucketAggregateBase { +} /** * @variant name=global * @ext_doc_id search-aggregations-bucket-global-aggregation */ -export class GlobalAggregate extends SingleBucketAggregateBase {} +export class GlobalAggregate extends SingleBucketAggregateBase { +} /** * @variant name=filter * @ext_doc_id search-aggregations-bucket-filter-aggregation */ -export class FilterAggregate extends SingleBucketAggregateBase {} +export class FilterAggregate extends SingleBucketAggregateBase { +} /** @variant name=sampler */ -export class SamplerAggregate extends SingleBucketAggregateBase {} +export class SamplerAggregate extends SingleBucketAggregateBase { +} /** @variant name=unmapped_sampler */ -export class UnmappedSamplerAggregate extends SingleBucketAggregateBase {} +export class UnmappedSamplerAggregate extends SingleBucketAggregateBase { +} //----- Geo grid /** @variant name=geohash_grid */ // Note: no keyed variant in the `InternalGeoGrid` parent class -export class GeoHashGridAggregate extends MultiBucketAggregateBase {} +export class GeoHashGridAggregate extends MultiBucketAggregateBase { +} export class GeoHashGridBucket extends MultiBucketBase { - key: GeoHash + key: GeoHash } /** @@ -647,17 +684,19 @@ export class GeoHashGridBucket extends MultiBucketBase { * @ext_doc_id search-aggregations-bucket-geotilegrid-aggregation */ // Note: no keyed variant in the `InternalGeoGrid` parent class -export class GeoTileGridAggregate extends MultiBucketAggregateBase {} +export class GeoTileGridAggregate extends MultiBucketAggregateBase { +} export class GeoTileGridBucket extends MultiBucketBase { - key: GeoTile + key: GeoTile } /** @variant name=geohex_grid */ -export class GeoHexGridAggregate extends MultiBucketAggregateBase {} +export class GeoHexGridAggregate extends MultiBucketAggregateBase { +} export class GeoHexGridBucket extends MultiBucketBase { - key: GeoHexCell + key: GeoHexCell } //----- Ranges @@ -666,15 +705,16 @@ export class GeoHexGridBucket extends MultiBucketBase { * @variant name=range * @ext_doc_id search-aggregations-bucket-range-aggregation */ -export class RangeAggregate extends MultiBucketAggregateBase {} +export class RangeAggregate extends MultiBucketAggregateBase { +} export class RangeBucket extends MultiBucketBase { - from?: double - to?: double - from_as_string?: string - to_as_string?: string - /** The bucket key. Present if the aggregation is _not_ keyed */ - key?: string + from?: double + to?: double + from_as_string?: string + to_as_string?: string + /** The bucket key. Present if the aggregation is _not_ keyed */ + key?: string } /** @@ -683,26 +723,29 @@ export class RangeBucket extends MultiBucketBase { * @variant name=date_range * @ext_doc_id search-aggregations-bucket-daterange-aggregation */ -export class DateRangeAggregate extends RangeAggregate {} +export class DateRangeAggregate extends RangeAggregate { +} /** * Result of a `geo_distance` aggregation. The unit for `from` and `to` is meters by default. * @variant name=geo_distance * @ext_doc_id search-aggregations-bucket-geodistance-aggregation */ -export class GeoDistanceAggregate extends RangeAggregate {} +export class GeoDistanceAggregate extends RangeAggregate { +} /** * @variant name=ip_range * @ext_doc_id search-aggregations-bucket-iprange-aggregation */ // ES: InternalBinaryRange -export class IpRangeAggregate extends MultiBucketAggregateBase {} +export class IpRangeAggregate extends MultiBucketAggregateBase { +} export class IpRangeBucket extends MultiBucketBase { - key?: string - from?: string - to?: string + key?: string + from?: string + to?: string } //----- Other multi-bucket @@ -711,10 +754,11 @@ export class IpRangeBucket extends MultiBucketBase { * @variant name=filters * @ext_doc_id search-aggregations-bucket-filters-aggregation */ -export class FiltersAggregate extends MultiBucketAggregateBase {} +export class FiltersAggregate extends MultiBucketAggregateBase { +} export class FiltersBucket extends MultiBucketBase { - key?: string + key?: string } /** @@ -722,42 +766,45 @@ export class FiltersBucket extends MultiBucketBase { * @ext_doc_id search-aggregations-bucket-adjacency-matrix-aggregation */ // Note: no keyed variant in the `InternalAdjacencyMatrix` -export class AdjacencyMatrixAggregate extends MultiBucketAggregateBase {} +export class AdjacencyMatrixAggregate extends MultiBucketAggregateBase { +} export class AdjacencyMatrixBucket extends MultiBucketBase { - key: string + key: string } /** * @ext_doc_id search-aggregations-bucket-significanttext-aggregation */ export class SignificantTermsAggregateBase< - T + T > extends MultiBucketAggregateBase { - bg_count?: long - doc_count?: long + bg_count?: long + doc_count?: long } /** @variant name=siglterms */ // ES: SignificantLongTerms & InternalSignificantTerms -export class SignificantLongTermsAggregate extends SignificantTermsAggregateBase {} +export class SignificantLongTermsAggregate extends SignificantTermsAggregateBase { +} export class SignificantTermsBucketBase extends MultiBucketBase { - score: double - bg_count: long + score: double + bg_count: long } export class SignificantLongTermsBucket extends SignificantTermsBucketBase { - key: long - key_as_string?: string + key: long + key_as_string?: string } /** @variant name=sigsterms */ // ES: SignificantStringTerms & InternalSignificantTerms -export class SignificantStringTermsAggregate extends SignificantTermsAggregateBase {} +export class SignificantStringTermsAggregate extends SignificantTermsAggregateBase { +} export class SignificantStringTermsBucket extends SignificantTermsBucketBase { - key: string + key: string } /** @@ -766,45 +813,49 @@ export class SignificantStringTermsBucket extends SignificantTermsBucketBase { */ // ES: UnmappedSignificantTerms // See note in UnmappedTermsAggregate -export class UnmappedSignificantTermsAggregate extends SignificantTermsAggregateBase {} +export class UnmappedSignificantTermsAggregate extends SignificantTermsAggregateBase { +} /** @variant name=composite */ // Note: no keyed variant export class CompositeAggregate extends MultiBucketAggregateBase { - // Must be consistent with CompositeAggregation.after and CompositeBucket.key - after_key?: CompositeAggregateKey + // Must be consistent with CompositeAggregation.after and CompositeBucket.key + after_key?: CompositeAggregateKey } export class CompositeBucket extends MultiBucketBase { - key: CompositeAggregateKey + key: CompositeAggregateKey } /** * @variant name=ip_prefix * @ext_doc_id search-aggregations-bucket-ipprefix-aggregation */ -export class IpPrefixAggregate extends MultiBucketAggregateBase {} +export class IpPrefixAggregate extends MultiBucketAggregateBase { +} export class IpPrefixBucket extends MultiBucketBase { - is_ipv6: boolean - key: string - prefix_length: integer - netmask?: string + is_ipv6: boolean + key: string + prefix_length: integer + netmask?: string } /** @variant name=frequent_item_sets */ -export class FrequentItemSetsAggregate extends MultiBucketAggregateBase {} +export class FrequentItemSetsAggregate extends MultiBucketAggregateBase { +} export class FrequentItemSetsBucket extends MultiBucketBase { - key: Dictionary - support: double + key: Dictionary + support: double } /** @variant name=time_series */ -export class TimeSeriesAggregate extends MultiBucketAggregateBase {} +export class TimeSeriesAggregate extends MultiBucketAggregateBase { +} export class TimeSeriesBucket extends MultiBucketBase { - key: Dictionary + key: Dictionary } //----- Misc @@ -814,7 +865,7 @@ export class TimeSeriesBucket extends MultiBucketBase { * @ext_doc_id search-aggregations-metrics-scripted-metric-aggregation */ export class ScriptedMetricAggregate extends AggregateBase { - value: UserDefinedValue + value: UserDefinedValue } /** @@ -822,7 +873,7 @@ export class ScriptedMetricAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-top-hits-aggregation */ export class TopHitsAggregate extends AggregateBase { - hits: HitsMetadata + hits: HitsMetadata } /** @@ -833,30 +884,29 @@ export class TopHitsAggregate extends AggregateBase { // This is a union with widely different fields, many of them being runtime-defined. We mimic below the few fields // present in `ParsedInference` with an additional properties spillover to not loose any data. export class InferenceAggregate - extends AggregateBase - implements AdditionalProperties -{ - value?: FieldValue - feature_importance?: InferenceFeatureImportance[] - top_classes?: InferenceTopClassEntry[] - warning?: string + extends AggregateBase + implements AdditionalProperties { + value?: FieldValue + feature_importance?: InferenceFeatureImportance[] + top_classes?: InferenceTopClassEntry[] + warning?: string } export class InferenceTopClassEntry { - class_name: FieldValue - class_probability: double - class_score: double + class_name: FieldValue + class_probability: double + class_score: double } export class InferenceFeatureImportance { - feature_name: string - importance?: double - classes?: InferenceClassImportance[] + feature_name: string + importance?: double + classes?: InferenceClassImportance[] } export class InferenceClassImportance { - class_name: string - importance: double + class_name: string + importance: double } //------ Plugin aggregations @@ -865,15 +915,15 @@ export class InferenceClassImportance { /** @variant name=string_stats */ export class StringStatsAggregate extends AggregateBase { - count: long - min_length: integer | null - max_length: integer | null - avg_length: double | null - entropy: double | null - distribution?: Dictionary | null - min_length_as_string?: string - max_length_as_string?: string - avg_length_as_string?: string + count: long + min_length: integer | null + max_length: integer | null + avg_length: double | null + entropy: double | null + distribution?: Dictionary | null + min_length_as_string?: string + max_length_as_string?: string + avg_length_as_string?: string } /** @@ -881,31 +931,31 @@ export class StringStatsAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-boxplot-aggregation */ export class BoxPlotAggregate extends AggregateBase { - min: double - max: double - q1: double - q2: double - q3: double - lower: double - upper: double - min_as_string?: string - max_as_string?: string - q1_as_string?: string - q2_as_string?: string - q3_as_string?: string - lower_as_string?: string - upper_as_string?: string + min: double + max: double + q1: double + q2: double + q3: double + lower: double + upper: double + min_as_string?: string + max_as_string?: string + q1_as_string?: string + q2_as_string?: string + q3_as_string?: string + lower_as_string?: string + upper_as_string?: string } /** @variant name=top_metrics */ export class TopMetricsAggregate extends AggregateBase { - top: TopMetrics[] + top: TopMetrics[] } export class TopMetrics { - // Always contains a single element since `top_metrics` only accepts a single sort field - sort: Array - metrics: Dictionary + // Always contains a single element since `top_metrics` only accepts a single sort field + sort: Array + metrics: Dictionary } /** @@ -913,8 +963,8 @@ export class TopMetrics { * @ext_doc_id search-aggregations-metrics-ttest-aggregation */ export class TTestAggregate extends AggregateBase { - value: double | null - value_as_string?: string + value: double | null + value_as_string?: string } /** @@ -922,8 +972,8 @@ export class TTestAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-rate-aggregation */ export class RateAggregate extends AggregateBase { - value: double - value_as_string?: string + value: double + value_as_string?: string } /** @@ -932,8 +982,8 @@ export class RateAggregate extends AggregateBase { */ // ES: InternalSimpleLongValue export class CumulativeCardinalityAggregate extends AggregateBase { - value: long - value_as_string?: string + value: long + value_as_string?: string } /** @@ -941,19 +991,19 @@ export class CumulativeCardinalityAggregate extends AggregateBase { * @ext_doc_id search-aggregations-matrix-stats-aggregation */ export class MatrixStatsAggregate extends AggregateBase { - doc_count: long - fields?: MatrixStatsFields[] + doc_count: long + fields?: MatrixStatsFields[] } export class MatrixStatsFields { - name: Field - count: long - mean: double - variance: double - skewness: double - kurtosis: double - covariance: Dictionary - correlation: Dictionary + name: Field + count: long + mean: double + variance: double + skewness: double + kurtosis: double + covariance: Dictionary + correlation: Dictionary } //----- Parent join plugin @@ -962,13 +1012,15 @@ export class MatrixStatsFields { * @variant name=children * @ext_doc_id search-aggregations-bucket-children-aggregation */ -export class ChildrenAggregate extends SingleBucketAggregateBase {} +export class ChildrenAggregate extends SingleBucketAggregateBase { +} /** * @variant name=parent * @ext_doc_id search-aggregations-bucket-parent-aggregation */ -export class ParentAggregate extends SingleBucketAggregateBase {} +export class ParentAggregate extends SingleBucketAggregateBase { +} //----- Spatial plugin @@ -977,9 +1029,9 @@ export class ParentAggregate extends SingleBucketAggregateBase {} * @ext_doc_id search-aggregations-metrics-geo-line */ export class GeoLineAggregate extends AggregateBase { - type: string // should be "Feature" - geometry: GeoLine - // https://www.rfc-editor.org/rfc/rfc7946#section-3.2 - // "The value of the properties member is an object (any JSON object or a JSON null value)" - properties: UserDefinedValue + type: string // should be "Feature" + geometry: GeoLine + // https://www.rfc-editor.org/rfc/rfc7946#section-3.2 + // "The value of the properties member is an object (any JSON object or a JSON null value)" + properties: UserDefinedValue } From 1c1b8a896c0a6e9e117e7dd77697d3029336e946 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 7 Oct 2025 14:58:43 +0200 Subject: [PATCH 3/3] pretty --- .../_types/aggregations/Aggregate.ts | 788 ++++++++---------- 1 file changed, 368 insertions(+), 420 deletions(-) diff --git a/specification/_types/aggregations/Aggregate.ts b/specification/_types/aggregations/Aggregate.ts index 7bc93208d4..68f6f6ccc0 100644 --- a/specification/_types/aggregations/Aggregate.ts +++ b/specification/_types/aggregations/Aggregate.ts @@ -17,25 +17,25 @@ * under the License. */ -import {CompositeAggregateKey} from '@_types/aggregations/bucket' -import {AggregateName, Field, FieldValue, Metadata} from '@_types/common' +import { CompositeAggregateKey } from '@_types/aggregations/bucket' +import { AggregateName, Field, FieldValue, Metadata } from '@_types/common' import { - CartesianPoint, - GeoBounds, - GeoHash, - GeoHexCell, - GeoLine, - GeoLocation, - GeoTile, - TopLeftBottomRightGeoBounds + CartesianPoint, + GeoBounds, + GeoHash, + GeoHexCell, + GeoLine, + GeoLocation, + GeoTile, + TopLeftBottomRightGeoBounds } from '@_types/Geo' -import {double, integer, long} from '@_types/Numeric' -import {DurationLarge, EpochTime, UnitMillis} from '@_types/Time' -import {HitsMetadata} from '@global/search/_types/hits' -import {AdditionalProperties} from '@spec_utils/behaviors' -import {Dictionary} from '@spec_utils/Dictionary' -import {UserDefinedValue} from '@spec_utils/UserDefinedValue' -import {Void} from '@spec_utils/VoidValue' +import { double, integer, long } from '@_types/Numeric' +import { DurationLarge, EpochTime, UnitMillis } from '@_types/Time' +import { HitsMetadata } from '@global/search/_types/hits' +import { AdditionalProperties } from '@spec_utils/behaviors' +import { Dictionary } from '@spec_utils/Dictionary' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { Void } from '@spec_utils/VoidValue' /** * @variants typed_keys_quirk @@ -43,91 +43,91 @@ import {Void} from '@spec_utils/VoidValue' * @ext_doc_id search-aggregations */ export type Aggregate = - | CardinalityAggregate - // Digests - | HdrPercentilesAggregate - | HdrPercentileRanksAggregate - | TDigestPercentilesAggregate - | TDigestPercentileRanksAggregate - | PercentilesBucketAggregate - // Single value - | MedianAbsoluteDeviationAggregate - | MinAggregate - | MaxAggregate - | SumAggregate - | AvgAggregate - | WeightedAvgAggregate - | ValueCountAggregate - | SimpleValueAggregate - | DerivativeAggregate - | BucketMetricValueAggregate - | ChangePointAggregate - // Multi value - | StatsAggregate - | StatsBucketAggregate - | ExtendedStatsAggregate - | ExtendedStatsBucketAggregate - | CartesianBoundsAggregate - | CartesianCentroidAggregate - // Geo - | GeoBoundsAggregate - | GeoCentroidAggregate - // Histograms - | HistogramAggregate - | DateHistogramAggregate - | AutoDateHistogramAggregate - | VariableWidthHistogramAggregate - // Terms - | StringTermsAggregate - | LongTermsAggregate - | DoubleTermsAggregate - | UnmappedTermsAggregate - | LongRareTermsAggregate - | StringRareTermsAggregate - | UnmappedRareTermsAggregate - | MultiTermsAggregate - // Single bucket - | MissingAggregate - | NestedAggregate - | ReverseNestedAggregate - | GlobalAggregate - | FilterAggregate - | ChildrenAggregate - | ParentAggregate - | SamplerAggregate - | UnmappedSamplerAggregate - // Geo grid - | GeoHashGridAggregate - | GeoTileGridAggregate - | GeoHexGridAggregate - // Range - | RangeAggregate - | DateRangeAggregate - | GeoDistanceAggregate - | IpRangeAggregate - | IpPrefixAggregate - // Other multi-bucket - | FiltersAggregate - | AdjacencyMatrixAggregate - | SignificantLongTermsAggregate - | SignificantStringTermsAggregate - | UnmappedSignificantTermsAggregate - | CompositeAggregate - | FrequentItemSetsAggregate - | TimeSeriesAggregate - // - | ScriptedMetricAggregate - | TopHitsAggregate - | InferenceAggregate - // Analytics - | StringStatsAggregate - | BoxPlotAggregate - | TopMetricsAggregate - | TTestAggregate - | RateAggregate - | CumulativeCardinalityAggregate - | MatrixStatsAggregate - | GeoLineAggregate + | CardinalityAggregate + // Digests + | HdrPercentilesAggregate + | HdrPercentileRanksAggregate + | TDigestPercentilesAggregate + | TDigestPercentileRanksAggregate + | PercentilesBucketAggregate + // Single value + | MedianAbsoluteDeviationAggregate + | MinAggregate + | MaxAggregate + | SumAggregate + | AvgAggregate + | WeightedAvgAggregate + | ValueCountAggregate + | SimpleValueAggregate + | DerivativeAggregate + | BucketMetricValueAggregate + | ChangePointAggregate + // Multi value + | StatsAggregate + | StatsBucketAggregate + | ExtendedStatsAggregate + | ExtendedStatsBucketAggregate + | CartesianBoundsAggregate + | CartesianCentroidAggregate + // Geo + | GeoBoundsAggregate + | GeoCentroidAggregate + // Histograms + | HistogramAggregate + | DateHistogramAggregate + | AutoDateHistogramAggregate + | VariableWidthHistogramAggregate + // Terms + | StringTermsAggregate + | LongTermsAggregate + | DoubleTermsAggregate + | UnmappedTermsAggregate + | LongRareTermsAggregate + | StringRareTermsAggregate + | UnmappedRareTermsAggregate + | MultiTermsAggregate + // Single bucket + | MissingAggregate + | NestedAggregate + | ReverseNestedAggregate + | GlobalAggregate + | FilterAggregate + | ChildrenAggregate + | ParentAggregate + | SamplerAggregate + | UnmappedSamplerAggregate + // Geo grid + | GeoHashGridAggregate + | GeoTileGridAggregate + | GeoHexGridAggregate + // Range + | RangeAggregate + | DateRangeAggregate + | GeoDistanceAggregate + | IpRangeAggregate + | IpPrefixAggregate + // Other multi-bucket + | FiltersAggregate + | AdjacencyMatrixAggregate + | SignificantLongTermsAggregate + | SignificantStringTermsAggregate + | UnmappedSignificantTermsAggregate + | CompositeAggregate + | FrequentItemSetsAggregate + | TimeSeriesAggregate + // + | ScriptedMetricAggregate + | TopHitsAggregate + | InferenceAggregate + // Analytics + | StringStatsAggregate + | BoxPlotAggregate + | TopMetricsAggregate + | TTestAggregate + | RateAggregate + | CumulativeCardinalityAggregate + | MatrixStatsAggregate + | GeoLineAggregate // Aggregations are defined in the ES code base in two ways: // - in SearchModule.registerAggregations() @@ -139,19 +139,19 @@ export type Aggregate = // Exceptions to this scheme exist and are indicated in the relevant aggregates export class AggregateBase { - meta?: Metadata + meta?: Metadata } /** @variant name=cardinality */ export class CardinalityAggregate extends AggregateBase { - value: long + value: long } //----- Percentiles // ES: AbstractInternalHDRPercentiles, AbstractInternalTDigestPercentiles, InternalPercentilesBucket export class PercentilesAggregateBase extends AggregateBase { - values: Percentiles + values: Percentiles } /** @codegen_names keyed, array */ @@ -165,109 +165,96 @@ type Percentiles = KeyedPercentiles | Array type KeyedPercentiles = Dictionary export class ArrayPercentilesItem { - key: double - value: double | null - value_as_string?: string + key: double + value: double | null + value_as_string?: string } /** @variant name=hdr_percentiles */ -export class HdrPercentilesAggregate extends PercentilesAggregateBase { -} +export class HdrPercentilesAggregate extends PercentilesAggregateBase {} /** @variant name=hdr_percentile_ranks */ -export class HdrPercentileRanksAggregate extends PercentilesAggregateBase { -} +export class HdrPercentileRanksAggregate extends PercentilesAggregateBase {} /** @variant name=tdigest_percentiles */ -export class TDigestPercentilesAggregate extends PercentilesAggregateBase { -} +export class TDigestPercentilesAggregate extends PercentilesAggregateBase {} /** @variant name=tdigest_percentile_ranks */ -export class TDigestPercentileRanksAggregate extends PercentilesAggregateBase { -} +export class TDigestPercentileRanksAggregate extends PercentilesAggregateBase {} /** @variant name=percentiles_bucket */ -export class PercentilesBucketAggregate extends PercentilesAggregateBase { -} +export class PercentilesBucketAggregate extends PercentilesAggregateBase {} //----- Single value export class SingleMetricAggregateBase extends AggregateBase { - // HLRC: ParsedSingleValueNumericMetricsAggregation - // ES: InternalNumericMetricsAggregation.SingleValue - /** - * The metric value. A missing value generally means that there was no data to aggregate, - * unless specified otherwise. - */ - value: double | null - value_as_string?: string + // HLRC: ParsedSingleValueNumericMetricsAggregation + // ES: InternalNumericMetricsAggregation.SingleValue + /** + * The metric value. A missing value generally means that there was no data to aggregate, + * unless specified otherwise. + */ + value: double | null + value_as_string?: string } /** @variant name=median_absolute_deviation */ -export class MedianAbsoluteDeviationAggregate extends SingleMetricAggregateBase { -} +export class MedianAbsoluteDeviationAggregate extends SingleMetricAggregateBase {} /** * @variant name=min * @ext_doc_id search-aggregations-metrics-min-aggregation */ -export class MinAggregate extends SingleMetricAggregateBase { -} +export class MinAggregate extends SingleMetricAggregateBase {} /** * @variant name=max * @ext_doc_id search-aggregations-metrics-max-aggregation */ -export class MaxAggregate extends SingleMetricAggregateBase { -} +export class MaxAggregate extends SingleMetricAggregateBase {} /** * Sum aggregation result. `value` is always present and is zero if there were no values to process. * @variant name=sum * @ext_doc_id search-aggregations-metrics-sum-aggregation */ -export class SumAggregate extends SingleMetricAggregateBase { -} +export class SumAggregate extends SingleMetricAggregateBase {} /** * @variant name=avg * @ext_doc_id search-aggregations-metrics-avg-aggregation */ -export class AvgAggregate extends SingleMetricAggregateBase { -} +export class AvgAggregate extends SingleMetricAggregateBase {} /** * Weighted average aggregation result. `value` is missing if the weight was set to zero. * @variant name=weighted_avg * @ext_doc_id search-aggregations-metrics-weight-avg-aggregation */ -export class WeightedAvgAggregate extends SingleMetricAggregateBase { -} +export class WeightedAvgAggregate extends SingleMetricAggregateBase {} /** * Value count aggregation result. `value` is always present. * @variant name=value_count * @ext_doc_id search-aggregations-metrics-valuecount-aggregation */ -export class ValueCountAggregate extends SingleMetricAggregateBase { -} +export class ValueCountAggregate extends SingleMetricAggregateBase {} /** @variant name=simple_value */ -export class SimpleValueAggregate extends SingleMetricAggregateBase { -} +export class SimpleValueAggregate extends SingleMetricAggregateBase {} /** * @variant name=derivative * @ext_doc_id search-aggregations-pipeline-derivative-aggregation */ export class DerivativeAggregate extends SingleMetricAggregateBase { - normalized_value?: double - normalized_value_as_string?: string + normalized_value?: double + normalized_value_as_string?: string } /** @variant name=bucket_metric_value */ export class BucketMetricValueAggregate extends SingleMetricAggregateBase { - keys: string[] + keys: string[] } //----- Multi value @@ -279,40 +266,39 @@ export class BucketMetricValueAggregate extends SingleMetricAggregateBase { * @ext_doc_id search-aggregations-metrics-stats-aggregation */ export class StatsAggregate extends AggregateBase { - count: long - min: double | null - max: double | null - avg: double | null - sum: double - min_as_string?: string - max_as_string?: string - avg_as_string?: string - sum_as_string?: string + count: long + min: double | null + max: double | null + avg: double | null + sum: double + min_as_string?: string + max_as_string?: string + avg_as_string?: string + sum_as_string?: string } /** * @variant name=stats_bucket * @ext_doc_id search-aggregations-pipeline-stats-bucket-aggregation */ -export class StatsBucketAggregate extends StatsAggregate { -} +export class StatsBucketAggregate extends StatsAggregate {} export class StandardDeviationBounds { - upper: double | null - lower: double | null - upper_population: double | null - lower_population: double | null - upper_sampling: double | null - lower_sampling: double | null + upper: double | null + lower: double | null + upper_population: double | null + lower_population: double | null + upper_sampling: double | null + lower_sampling: double | null } export class StandardDeviationBoundsAsString { - upper: string - lower: string - upper_population: string - lower_population: string - upper_sampling: string - lower_sampling: string + upper: string + lower: string + upper_population: string + lower_population: string + upper_sampling: string + lower_sampling: string } /** @@ -320,37 +306,36 @@ export class StandardDeviationBoundsAsString { * @ext_doc_id search-aggregations-metrics-extendedstats-aggregation */ export class ExtendedStatsAggregate extends StatsAggregate { - sum_of_squares: double | null - variance: double | null - variance_population: double | null - variance_sampling: double | null - std_deviation: double | null - std_deviation_population: double | null - std_deviation_sampling: double | null - // Always sent (see InternalExtendedStats), but semantically it's useless if std_deviation is null - std_deviation_bounds?: StandardDeviationBounds - - sum_of_squares_as_string?: string - variance_as_string?: string - variance_population_as_string?: string - variance_sampling_as_string?: string - std_deviation_as_string?: string - std_deviation_bounds_as_string?: StandardDeviationBoundsAsString + sum_of_squares: double | null + variance: double | null + variance_population: double | null + variance_sampling: double | null + std_deviation: double | null + std_deviation_population: double | null + std_deviation_sampling: double | null + // Always sent (see InternalExtendedStats), but semantically it's useless if std_deviation is null + std_deviation_bounds?: StandardDeviationBounds + + sum_of_squares_as_string?: string + variance_as_string?: string + variance_population_as_string?: string + variance_sampling_as_string?: string + std_deviation_as_string?: string + std_deviation_bounds_as_string?: StandardDeviationBoundsAsString } /** @variant name=extended_stats_bucket */ -export class ExtendedStatsBucketAggregate extends ExtendedStatsAggregate { -} +export class ExtendedStatsBucketAggregate extends ExtendedStatsAggregate {} /** @variant name=cartesian_bounds */ export class CartesianBoundsAggregate extends AggregateBase { - bounds?: TopLeftBottomRightGeoBounds + bounds?: TopLeftBottomRightGeoBounds } /** @variant name=cartesian_centroid */ export class CartesianCentroidAggregate extends AggregateBase { - count: long - location?: CartesianPoint + count: long + location?: CartesianPoint } //----- Geo @@ -360,7 +345,7 @@ export class CartesianCentroidAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-geobounds-aggregation */ export class GeoBoundsAggregate extends AggregateBase { - bounds?: GeoBounds + bounds?: GeoBounds } /** @@ -368,8 +353,8 @@ export class GeoBoundsAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-geocentroid-aggregation */ export class GeoCentroidAggregate extends AggregateBase { - count: long - location?: GeoLocation + count: long + location?: GeoLocation } //----- Histograms @@ -386,7 +371,7 @@ export class GeoCentroidAggregate extends AggregateBase { export type Buckets = Dictionary | Array export class MultiBucketAggregateBase extends AggregateBase { - buckets: Buckets + buckets: Buckets } /** @@ -395,91 +380,85 @@ export class MultiBucketAggregateBase extends AggregateBase { * @behavior_meta AdditionalProperties fieldname=aggregations description="Nested aggregations" */ export class MultiBucketBase - implements AdditionalProperties { - doc_count: long + implements AdditionalProperties +{ + doc_count: long } /** @variant name=change_point */ export class ChangePointAggregate extends AggregateBase { - type: ChangeType - bucket?: ChangePointBucket + type: ChangeType + bucket?: ChangePointBucket } export class ChangePointBucket extends MultiBucketBase { - key: FieldValue + key: FieldValue } /** * @variants container */ export class ChangeType { - dip?: Dip - distribution_change?: DistributionChange - indeterminable?: Indeterminable - non_stationary?: NonStationary - spike?: Spike - stationary?: Stationary - step_change?: StepChange - trend_change?: TrendChange + dip?: Dip + distribution_change?: DistributionChange + indeterminable?: Indeterminable + non_stationary?: NonStationary + spike?: Spike + stationary?: Stationary + step_change?: StepChange + trend_change?: TrendChange } export class AbstractChangePoint { - p_value: double - change_point: integer + p_value: double + change_point: integer } -export class Dip extends AbstractChangePoint { -} +export class Dip extends AbstractChangePoint {} -export class DistributionChange extends AbstractChangePoint { -} +export class DistributionChange extends AbstractChangePoint {} -export class Spike extends AbstractChangePoint { -} +export class Spike extends AbstractChangePoint {} -export class StepChange extends AbstractChangePoint { -} +export class StepChange extends AbstractChangePoint {} export class Indeterminable { - reason: string + reason: string } export class NonStationary { - p_value: double - r_value: double - trend: string + p_value: double + r_value: double + trend: string } -export class Stationary { -} +export class Stationary {} export class TrendChange { - p_value: double - r_value: double - change_point: integer + p_value: double + r_value: double + change_point: integer } /** * @variant name=histogram * @ext_doc_id search-aggregations-bucket-histogram-aggregation */ -export class HistogramAggregate extends MultiBucketAggregateBase { -} +export class HistogramAggregate extends MultiBucketAggregateBase {} export class HistogramBucket extends MultiBucketBase { - key_as_string?: string - key: double + key_as_string?: string + key: double } /** @variant name=date_histogram * @ext_doc_id search-aggregations-bucket-datehistogram-aggregation */ -export class DateHistogramAggregate extends MultiBucketAggregateBase { -} +export class DateHistogramAggregate extends MultiBucketAggregateBase {} export class DateHistogramBucket extends MultiBucketBase { - key_as_string?: string - key: EpochTime + key_as_string?: string + key: EpochTime } /** @@ -488,30 +467,29 @@ export class DateHistogramBucket extends MultiBucketBase { */ // Note: no keyed variant in `InternalAutoDateHistogram` export class AutoDateHistogramAggregate extends MultiBucketAggregateBase { - interval: DurationLarge + interval: DurationLarge } /** @variant name=variable_width_histogram */ // Note: no keyed variant in `InternalVariableWidthHistogram` -export class VariableWidthHistogramAggregate extends MultiBucketAggregateBase { -} +export class VariableWidthHistogramAggregate extends MultiBucketAggregateBase {} export class VariableWidthHistogramBucket extends MultiBucketBase { - min: double - key: double - max: double - min_as_string?: string - key_as_string?: string - max_as_string?: string + min: double + key: double + max: double + min_as_string?: string + key_as_string?: string + max_as_string?: string } //----- Terms export class TermsAggregateBase< - TBucket + TBucket > extends MultiBucketAggregateBase { - doc_count_error_upper_bound?: long - sum_other_doc_count?: long + doc_count_error_upper_bound?: long + sum_other_doc_count?: long } /** @@ -519,15 +497,14 @@ export class TermsAggregateBase< * @variant name=sterms */ // ES: StringTerms -export class StringTermsAggregate extends TermsAggregateBase { -} +export class StringTermsAggregate extends TermsAggregateBase {} export class TermsBucketBase extends MultiBucketBase { - doc_count_error_upper_bound?: long + doc_count_error_upper_bound?: long } export class StringTermsBucket extends TermsBucketBase { - key: FieldValue + key: FieldValue } /** @@ -535,12 +512,11 @@ export class StringTermsBucket extends TermsBucketBase { * @variant name=lterms */ // ES: LongTerms -export class LongTermsAggregate extends TermsAggregateBase { -} +export class LongTermsAggregate extends TermsAggregateBase {} export class LongTermsBucket extends TermsBucketBase { - key: long - key_as_string?: string + key: long + key_as_string?: string } /** @@ -548,12 +524,11 @@ export class LongTermsBucket extends TermsBucketBase { * @variant name=dterms */ // ES: DoubleTerms -export class DoubleTermsAggregate extends TermsAggregateBase { -} +export class DoubleTermsAggregate extends TermsAggregateBase {} export class DoubleTermsBucket extends TermsBucketBase { - key: double - key_as_string?: string + key: double + key_as_string?: string } /** @@ -562,31 +537,28 @@ export class DoubleTermsBucket extends TermsBucketBase { */ // ES: UnmappedTerms // Since the buckets array is present but always empty, we use `Void` as the bucket type. -export class UnmappedTermsAggregate extends TermsAggregateBase { -} +export class UnmappedTermsAggregate extends TermsAggregateBase {} /** * Result of the `rare_terms` aggregation when the field is some kind of whole number like a integer, long, or a date. * @variant name=lrareterms */ // ES: LongRareTerms -export class LongRareTermsAggregate extends MultiBucketAggregateBase { -} +export class LongRareTermsAggregate extends MultiBucketAggregateBase {} export class LongRareTermsBucket extends MultiBucketBase { - key: long - key_as_string?: string + key: long + key_as_string?: string } /** * Result of the `rare_terms` aggregation when the field is a string. * @variant name=srareterms */ -export class StringRareTermsAggregate extends MultiBucketAggregateBase { -} +export class StringRareTermsAggregate extends MultiBucketAggregateBase {} export class StringRareTermsBucket extends MultiBucketBase { - key: string + key: string } /** @@ -595,21 +567,19 @@ export class StringRareTermsBucket extends MultiBucketBase { */ // ES: UnmappedRareTerms // Since the buckets array is present but always empty, we use `Void` as the bucket type. -export class UnmappedRareTermsAggregate extends MultiBucketAggregateBase { -} +export class UnmappedRareTermsAggregate extends MultiBucketAggregateBase {} /** * @variant name=multi_terms * @ext_doc_id search-aggregations-bucket-multi-terms-aggregation */ // Note: no keyed variant -export class MultiTermsAggregate extends TermsAggregateBase { -} +export class MultiTermsAggregate extends TermsAggregateBase {} export class MultiTermsBucket extends MultiBucketBase { - key: Array - key_as_string?: string - doc_count_error_upper_bound?: long + key: Array + key_as_string?: string + doc_count_error_upper_bound?: long } //----- Single bucket @@ -620,63 +590,56 @@ export class MultiTermsBucket extends MultiBucketBase { * @behavior_meta AdditionalProperties fieldname=aggregations description="Nested aggregations" */ export class SingleBucketAggregateBase - extends AggregateBase - implements AdditionalProperties { - doc_count: long + extends AggregateBase + implements AdditionalProperties +{ + doc_count: long } /** * @variant name=missing * @ext_doc_id search-aggregations-bucket-missing-aggregation */ -export class MissingAggregate extends SingleBucketAggregateBase { -} +export class MissingAggregate extends SingleBucketAggregateBase {} /** * @variant name=nested * @ext_doc_id search-aggregations-bucket-nested-aggregation */ -export class NestedAggregate extends SingleBucketAggregateBase { -} +export class NestedAggregate extends SingleBucketAggregateBase {} /** * @variant name=reverse_nested * @ext_doc_id search-aggregations-bucket-reverse-nested-aggregation */ -export class ReverseNestedAggregate extends SingleBucketAggregateBase { -} +export class ReverseNestedAggregate extends SingleBucketAggregateBase {} /** * @variant name=global * @ext_doc_id search-aggregations-bucket-global-aggregation */ -export class GlobalAggregate extends SingleBucketAggregateBase { -} +export class GlobalAggregate extends SingleBucketAggregateBase {} /** * @variant name=filter * @ext_doc_id search-aggregations-bucket-filter-aggregation */ -export class FilterAggregate extends SingleBucketAggregateBase { -} +export class FilterAggregate extends SingleBucketAggregateBase {} /** @variant name=sampler */ -export class SamplerAggregate extends SingleBucketAggregateBase { -} +export class SamplerAggregate extends SingleBucketAggregateBase {} /** @variant name=unmapped_sampler */ -export class UnmappedSamplerAggregate extends SingleBucketAggregateBase { -} +export class UnmappedSamplerAggregate extends SingleBucketAggregateBase {} //----- Geo grid /** @variant name=geohash_grid */ // Note: no keyed variant in the `InternalGeoGrid` parent class -export class GeoHashGridAggregate extends MultiBucketAggregateBase { -} +export class GeoHashGridAggregate extends MultiBucketAggregateBase {} export class GeoHashGridBucket extends MultiBucketBase { - key: GeoHash + key: GeoHash } /** @@ -684,19 +647,17 @@ export class GeoHashGridBucket extends MultiBucketBase { * @ext_doc_id search-aggregations-bucket-geotilegrid-aggregation */ // Note: no keyed variant in the `InternalGeoGrid` parent class -export class GeoTileGridAggregate extends MultiBucketAggregateBase { -} +export class GeoTileGridAggregate extends MultiBucketAggregateBase {} export class GeoTileGridBucket extends MultiBucketBase { - key: GeoTile + key: GeoTile } /** @variant name=geohex_grid */ -export class GeoHexGridAggregate extends MultiBucketAggregateBase { -} +export class GeoHexGridAggregate extends MultiBucketAggregateBase {} export class GeoHexGridBucket extends MultiBucketBase { - key: GeoHexCell + key: GeoHexCell } //----- Ranges @@ -705,16 +666,15 @@ export class GeoHexGridBucket extends MultiBucketBase { * @variant name=range * @ext_doc_id search-aggregations-bucket-range-aggregation */ -export class RangeAggregate extends MultiBucketAggregateBase { -} +export class RangeAggregate extends MultiBucketAggregateBase {} export class RangeBucket extends MultiBucketBase { - from?: double - to?: double - from_as_string?: string - to_as_string?: string - /** The bucket key. Present if the aggregation is _not_ keyed */ - key?: string + from?: double + to?: double + from_as_string?: string + to_as_string?: string + /** The bucket key. Present if the aggregation is _not_ keyed */ + key?: string } /** @@ -723,29 +683,26 @@ export class RangeBucket extends MultiBucketBase { * @variant name=date_range * @ext_doc_id search-aggregations-bucket-daterange-aggregation */ -export class DateRangeAggregate extends RangeAggregate { -} +export class DateRangeAggregate extends RangeAggregate {} /** * Result of a `geo_distance` aggregation. The unit for `from` and `to` is meters by default. * @variant name=geo_distance * @ext_doc_id search-aggregations-bucket-geodistance-aggregation */ -export class GeoDistanceAggregate extends RangeAggregate { -} +export class GeoDistanceAggregate extends RangeAggregate {} /** * @variant name=ip_range * @ext_doc_id search-aggregations-bucket-iprange-aggregation */ // ES: InternalBinaryRange -export class IpRangeAggregate extends MultiBucketAggregateBase { -} +export class IpRangeAggregate extends MultiBucketAggregateBase {} export class IpRangeBucket extends MultiBucketBase { - key?: string - from?: string - to?: string + key?: string + from?: string + to?: string } //----- Other multi-bucket @@ -754,11 +711,10 @@ export class IpRangeBucket extends MultiBucketBase { * @variant name=filters * @ext_doc_id search-aggregations-bucket-filters-aggregation */ -export class FiltersAggregate extends MultiBucketAggregateBase { -} +export class FiltersAggregate extends MultiBucketAggregateBase {} export class FiltersBucket extends MultiBucketBase { - key?: string + key?: string } /** @@ -766,45 +722,42 @@ export class FiltersBucket extends MultiBucketBase { * @ext_doc_id search-aggregations-bucket-adjacency-matrix-aggregation */ // Note: no keyed variant in the `InternalAdjacencyMatrix` -export class AdjacencyMatrixAggregate extends MultiBucketAggregateBase { -} +export class AdjacencyMatrixAggregate extends MultiBucketAggregateBase {} export class AdjacencyMatrixBucket extends MultiBucketBase { - key: string + key: string } /** * @ext_doc_id search-aggregations-bucket-significanttext-aggregation */ export class SignificantTermsAggregateBase< - T + T > extends MultiBucketAggregateBase { - bg_count?: long - doc_count?: long + bg_count?: long + doc_count?: long } /** @variant name=siglterms */ // ES: SignificantLongTerms & InternalSignificantTerms -export class SignificantLongTermsAggregate extends SignificantTermsAggregateBase { -} +export class SignificantLongTermsAggregate extends SignificantTermsAggregateBase {} export class SignificantTermsBucketBase extends MultiBucketBase { - score: double - bg_count: long + score: double + bg_count: long } export class SignificantLongTermsBucket extends SignificantTermsBucketBase { - key: long - key_as_string?: string + key: long + key_as_string?: string } /** @variant name=sigsterms */ // ES: SignificantStringTerms & InternalSignificantTerms -export class SignificantStringTermsAggregate extends SignificantTermsAggregateBase { -} +export class SignificantStringTermsAggregate extends SignificantTermsAggregateBase {} export class SignificantStringTermsBucket extends SignificantTermsBucketBase { - key: string + key: string } /** @@ -813,49 +766,45 @@ export class SignificantStringTermsBucket extends SignificantTermsBucketBase { */ // ES: UnmappedSignificantTerms // See note in UnmappedTermsAggregate -export class UnmappedSignificantTermsAggregate extends SignificantTermsAggregateBase { -} +export class UnmappedSignificantTermsAggregate extends SignificantTermsAggregateBase {} /** @variant name=composite */ // Note: no keyed variant export class CompositeAggregate extends MultiBucketAggregateBase { - // Must be consistent with CompositeAggregation.after and CompositeBucket.key - after_key?: CompositeAggregateKey + // Must be consistent with CompositeAggregation.after and CompositeBucket.key + after_key?: CompositeAggregateKey } export class CompositeBucket extends MultiBucketBase { - key: CompositeAggregateKey + key: CompositeAggregateKey } /** * @variant name=ip_prefix * @ext_doc_id search-aggregations-bucket-ipprefix-aggregation */ -export class IpPrefixAggregate extends MultiBucketAggregateBase { -} +export class IpPrefixAggregate extends MultiBucketAggregateBase {} export class IpPrefixBucket extends MultiBucketBase { - is_ipv6: boolean - key: string - prefix_length: integer - netmask?: string + is_ipv6: boolean + key: string + prefix_length: integer + netmask?: string } /** @variant name=frequent_item_sets */ -export class FrequentItemSetsAggregate extends MultiBucketAggregateBase { -} +export class FrequentItemSetsAggregate extends MultiBucketAggregateBase {} export class FrequentItemSetsBucket extends MultiBucketBase { - key: Dictionary - support: double + key: Dictionary + support: double } /** @variant name=time_series */ -export class TimeSeriesAggregate extends MultiBucketAggregateBase { -} +export class TimeSeriesAggregate extends MultiBucketAggregateBase {} export class TimeSeriesBucket extends MultiBucketBase { - key: Dictionary + key: Dictionary } //----- Misc @@ -865,7 +814,7 @@ export class TimeSeriesBucket extends MultiBucketBase { * @ext_doc_id search-aggregations-metrics-scripted-metric-aggregation */ export class ScriptedMetricAggregate extends AggregateBase { - value: UserDefinedValue + value: UserDefinedValue } /** @@ -873,7 +822,7 @@ export class ScriptedMetricAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-top-hits-aggregation */ export class TopHitsAggregate extends AggregateBase { - hits: HitsMetadata + hits: HitsMetadata } /** @@ -884,29 +833,30 @@ export class TopHitsAggregate extends AggregateBase { // This is a union with widely different fields, many of them being runtime-defined. We mimic below the few fields // present in `ParsedInference` with an additional properties spillover to not loose any data. export class InferenceAggregate - extends AggregateBase - implements AdditionalProperties { - value?: FieldValue - feature_importance?: InferenceFeatureImportance[] - top_classes?: InferenceTopClassEntry[] - warning?: string + extends AggregateBase + implements AdditionalProperties +{ + value?: FieldValue + feature_importance?: InferenceFeatureImportance[] + top_classes?: InferenceTopClassEntry[] + warning?: string } export class InferenceTopClassEntry { - class_name: FieldValue - class_probability: double - class_score: double + class_name: FieldValue + class_probability: double + class_score: double } export class InferenceFeatureImportance { - feature_name: string - importance?: double - classes?: InferenceClassImportance[] + feature_name: string + importance?: double + classes?: InferenceClassImportance[] } export class InferenceClassImportance { - class_name: string - importance: double + class_name: string + importance: double } //------ Plugin aggregations @@ -915,15 +865,15 @@ export class InferenceClassImportance { /** @variant name=string_stats */ export class StringStatsAggregate extends AggregateBase { - count: long - min_length: integer | null - max_length: integer | null - avg_length: double | null - entropy: double | null - distribution?: Dictionary | null - min_length_as_string?: string - max_length_as_string?: string - avg_length_as_string?: string + count: long + min_length: integer | null + max_length: integer | null + avg_length: double | null + entropy: double | null + distribution?: Dictionary | null + min_length_as_string?: string + max_length_as_string?: string + avg_length_as_string?: string } /** @@ -931,31 +881,31 @@ export class StringStatsAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-boxplot-aggregation */ export class BoxPlotAggregate extends AggregateBase { - min: double - max: double - q1: double - q2: double - q3: double - lower: double - upper: double - min_as_string?: string - max_as_string?: string - q1_as_string?: string - q2_as_string?: string - q3_as_string?: string - lower_as_string?: string - upper_as_string?: string + min: double + max: double + q1: double + q2: double + q3: double + lower: double + upper: double + min_as_string?: string + max_as_string?: string + q1_as_string?: string + q2_as_string?: string + q3_as_string?: string + lower_as_string?: string + upper_as_string?: string } /** @variant name=top_metrics */ export class TopMetricsAggregate extends AggregateBase { - top: TopMetrics[] + top: TopMetrics[] } export class TopMetrics { - // Always contains a single element since `top_metrics` only accepts a single sort field - sort: Array - metrics: Dictionary + // Always contains a single element since `top_metrics` only accepts a single sort field + sort: Array + metrics: Dictionary } /** @@ -963,8 +913,8 @@ export class TopMetrics { * @ext_doc_id search-aggregations-metrics-ttest-aggregation */ export class TTestAggregate extends AggregateBase { - value: double | null - value_as_string?: string + value: double | null + value_as_string?: string } /** @@ -972,8 +922,8 @@ export class TTestAggregate extends AggregateBase { * @ext_doc_id search-aggregations-metrics-rate-aggregation */ export class RateAggregate extends AggregateBase { - value: double - value_as_string?: string + value: double + value_as_string?: string } /** @@ -982,8 +932,8 @@ export class RateAggregate extends AggregateBase { */ // ES: InternalSimpleLongValue export class CumulativeCardinalityAggregate extends AggregateBase { - value: long - value_as_string?: string + value: long + value_as_string?: string } /** @@ -991,19 +941,19 @@ export class CumulativeCardinalityAggregate extends AggregateBase { * @ext_doc_id search-aggregations-matrix-stats-aggregation */ export class MatrixStatsAggregate extends AggregateBase { - doc_count: long - fields?: MatrixStatsFields[] + doc_count: long + fields?: MatrixStatsFields[] } export class MatrixStatsFields { - name: Field - count: long - mean: double - variance: double - skewness: double - kurtosis: double - covariance: Dictionary - correlation: Dictionary + name: Field + count: long + mean: double + variance: double + skewness: double + kurtosis: double + covariance: Dictionary + correlation: Dictionary } //----- Parent join plugin @@ -1012,15 +962,13 @@ export class MatrixStatsFields { * @variant name=children * @ext_doc_id search-aggregations-bucket-children-aggregation */ -export class ChildrenAggregate extends SingleBucketAggregateBase { -} +export class ChildrenAggregate extends SingleBucketAggregateBase {} /** * @variant name=parent * @ext_doc_id search-aggregations-bucket-parent-aggregation */ -export class ParentAggregate extends SingleBucketAggregateBase { -} +export class ParentAggregate extends SingleBucketAggregateBase {} //----- Spatial plugin @@ -1029,9 +977,9 @@ export class ParentAggregate extends SingleBucketAggregateBase { * @ext_doc_id search-aggregations-metrics-geo-line */ export class GeoLineAggregate extends AggregateBase { - type: string // should be "Feature" - geometry: GeoLine - // https://www.rfc-editor.org/rfc/rfc7946#section-3.2 - // "The value of the properties member is an object (any JSON object or a JSON null value)" - properties: UserDefinedValue + type: string // should be "Feature" + geometry: GeoLine + // https://www.rfc-editor.org/rfc/rfc7946#section-3.2 + // "The value of the properties member is an object (any JSON object or a JSON null value)" + properties: UserDefinedValue }