Skip to content

Commit

Permalink
Allow to set 'index: false' in dynamic templates defined in data stre…
Browse files Browse the repository at this point in the history
…am manifests (#650)
  • Loading branch information
jsoriano authored Oct 24, 2023
1 parent 58c4b65 commit 87dc65f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
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

0 comments on commit 87dc65f

Please sign in to comment.