Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions output/openapi/elasticsearch-openapi.json

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

8 changes: 8 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.

22 changes: 21 additions & 1 deletion output/schema/schema.json

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

1 change: 1 addition & 0 deletions output/typescript/types.ts

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

6 changes: 6 additions & 0 deletions specification/indices/_types/IndexState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { TypeMapping } from '@_types/mapping/TypeMapping'
import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle'
import { Dictionary } from '@spec_utils/Dictionary'
import { Alias } from './Alias'
import { DataStreamOptionsTemplate } from './DataStreamOptions'
import { IndexSettings } from './IndexSettings'

export class IndexState {
Expand All @@ -31,6 +32,11 @@ export class IndexState {
/** Default settings, included when the request's `include_default` is `true`. */
defaults?: IndexSettings
data_stream?: DataStreamName
/**
* @availability stack since=8.18.0 stability=stable
* @availability serverless stability=stable
*/
data_stream_options?: DataStreamOptionsTemplate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place to add this field. I see the class IndexState is indeed used for the template field of component templates here:

/**
* The template to be applied which includes mappings, settings, or aliases configuration.
*/
template: IndexState

But it's also used in the GET {index} API response:
I'd say that the name IndexState matches most with the second use case, and that maybe at the time its fields happened to match the template field of the PUT _component_template API, but they don't match anymore; the data_stream field is not valid in the template field for component templates (or any kind of templates for that matter, it's only valid in the root body of index templates, see here).

I see that 00be10a did try to add the data_stream_options field in some places, but it doesn't look 100% correct to me. Let me have a look and try to correct some things.

/**
* Data stream lifecycle applicable if this is a data stream.
* @availability stack since=8.11.0 stability=stable
Expand Down