Skip to content

Commit 87dc65f

Browse files
authored
Allow to set 'index: false' in dynamic templates defined in data stream manifests (#650)
1 parent 58c4b65 commit 87dc65f

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

spec/changelog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- description: Using non-GA versions of the spec in GA packages produces a filterable validation error instead of a warning
88
type: enhancement
99
link: https://github.com/elastic/package-spec/pull/627
10+
- description: 'Allow to set index: false in dynamic templates defined in data stream manifests'
11+
type: enhancement
12+
link: https://github.com/elastic/package-spec/issues/650
1013
- version: 3.0.0
1114
changes:
1215
- description: Validate processors used in ingest pipelines

spec/integration/data_stream/manifest.spec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ spec:
300300
$ref: "./fields/fields.spec.yml#/items/properties/default_metric"
301301
ignore_above:
302302
$ref: "./fields/fields.spec.yml#/items/properties/ignore_above"
303+
index:
304+
$ref: "./fields/fields.spec.yml#/items/properties/index"
303305
patternProperties:
304306
# Exception for fields imported by elastic-package when import_mappings is used.
305307
# TODO: Allow this only on built packages.

test/packages/good_v3/data_stream/foo/manifest.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ elasticsearch:
5858
number_of_shards: 1
5959
mappings:
6060
dynamic: strict
61+
dynamic_templates:
62+
- histogram:
63+
mapping:
64+
type: histogram
65+
- summary:
66+
mapping:
67+
type: aggregate_metric_double
68+
metrics:
69+
- sum
70+
- value_count
71+
default_metric: value_count
72+
- double:
73+
mapping:
74+
type: double
75+
index: false
6176
ingest_pipeline:
6277
name: foobar
6378
privileges:

0 commit comments

Comments
 (0)