Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set 'index: false' in dynamic templates defined in data streams #650

Merged
merged 1 commit into from
Oct 24, 2023
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
3 changes: 3 additions & 0 deletions spec/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
- description: Using non-GA versions of the spec in GA packages produces a filterable validation error instead of a warning
type: enhancement
link: https://github.com/elastic/package-spec/pull/627
- description: 'Allow to set index: false in dynamic templates defined in data stream manifests'
type: enhancement
link: https://github.com/elastic/package-spec/issues/650
- version: 3.0.0
changes:
- description: Validate processors used in ingest pipelines
Expand Down
2 changes: 2 additions & 0 deletions spec/integration/data_stream/manifest.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ spec:
$ref: "./fields/fields.spec.yml#/items/properties/default_metric"
ignore_above:
$ref: "./fields/fields.spec.yml#/items/properties/ignore_above"
index:
$ref: "./fields/fields.spec.yml#/items/properties/index"
patternProperties:
# Exception for fields imported by elastic-package when import_mappings is used.
# TODO: Allow this only on built packages.
Expand Down
15 changes: 15 additions & 0 deletions test/packages/good_v3/data_stream/foo/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ elasticsearch:
number_of_shards: 1
mappings:
dynamic: strict
dynamic_templates:
- histogram:
mapping:
type: histogram
- summary:
mapping:
type: aggregate_metric_double
metrics:
- sum
- value_count
default_metric: value_count
- double:
mapping:
type: double
index: false
ingest_pipeline:
name: foobar
privileges:
Expand Down