Skip to content
Merged
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
53 changes: 34 additions & 19 deletions output/openapi/elasticsearch-openapi.json

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

20 changes: 2 additions & 18 deletions output/openapi/elasticsearch-serverless-openapi.json

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

46 changes: 37 additions & 9 deletions output/schema/schema.json

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

5 changes: 4 additions & 1 deletion 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: 3 additions & 4 deletions specification/indices/_types/DownsamplingRound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
* under the License.
*/

import { Duration } from '@_types/Time'
import { DownsampleConfig } from '@indices/_types/Downsample'
import { Duration, DurationLarge } from '@_types/Time'

export class DownsamplingRound {
/**
* The duration since rollover when this downsampling round should execute
*/
after: Duration
/**
* The downsample configuration to execute.
* The downsample interval.
*/
config: DownsampleConfig
fixed_interval: DurationLarge
}
9 changes: 7 additions & 2 deletions specification/indices/downsample/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ 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.
*
* NOTE: Only indices in a time series data stream are supported.
* Neither field nor document level security can be defined on the source index.
* The source index must be read only (`index.blocks.write: true`).
* The source index must be read-only (`index.blocks.write: true`).
* @doc_id indices-downsample-data-stream
* @rest_spec_name indices.downsample
* @availability stack since=8.5.0 stability=experimental
Expand Down