Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 32 additions & 4 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions specification/indices/_types/Downsample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,13 @@ export class DownsampleConfig {
* The interval at which to aggregate the original time series index.
*/
fixed_interval: DurationLarge
/**
* The sampling method used to reduce the documents; it can be either `aggregate` or `last_value`. Defaults to `aggregate`.
*/
sampling_method?: SamplingMethod
}

enum SamplingMethod {
aggregate,
last_value
}
7 changes: 6 additions & 1 deletion specification/indices/downsample/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ import { DownsampleConfig } from '@indices/_types/Downsample'

/**
* Downsample an index.
* Aggregate a time series (TSDS) index and store pre-computed statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped by a configured time interval.
* Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:
*
* - When running in `aggregate` mode, it pre-calculates and stores statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`)
* for each metric field grouped by a configured time interval and their dimensions.
* - When running in `last_value` mode, it keeps the last value for each metric in the configured interval and their dimensions.
*
* For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
* All documents within an hour interval are summarized and stored as a single document in the downsample index.
*
Expand Down