From 6fff981f3ac9b9f604d832338171e382c014a1bc Mon Sep 17 00:00:00 2001 From: Giuseppe Santoro Date: Tue, 2 May 2023 15:37:24 +0100 Subject: [PATCH] remove mapping to trigger field (#1245) * remove mapping to trigger field * removed dynamic templates containing trigger field * address comments from pr * Update internal/builder/testdata/existing.yml Co-authored-by: Jaime Soriano Pastor * Update internal/builder/testdata/expected.existing.mappings.yml Co-authored-by: Jaime Soriano Pastor --------- Co-authored-by: Jaime Soriano Pastor --- internal/builder/_static/ecs_mappings.yaml | 4 ---- internal/builder/testdata/existing.yml | 8 +++++--- internal/builder/testdata/expected.existing.mappings.yml | 7 ++++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/internal/builder/_static/ecs_mappings.yaml b/internal/builder/_static/ecs_mappings.yaml index 7417d07a0..d42da2819 100644 --- a/internal/builder/_static/ecs_mappings.yaml +++ b/internal/builder/_static/ecs_mappings.yaml @@ -447,7 +447,3 @@ mappings: mapping: type: nested path_match: '*.macho.sections' - - trigger_to_nested: - mapping: - type: nested - match: trigger diff --git a/internal/builder/testdata/existing.yml b/internal/builder/testdata/existing.yml index a17128725..cbe7cd026 100644 --- a/internal/builder/testdata/existing.yml +++ b/internal/builder/testdata/existing.yml @@ -7,7 +7,9 @@ elasticsearch: example: type: short dynamic_templates: - - to_nested: - path: trigger + - forwarded_ip_to_ip: mapping: - type: nested + type: ip + match: forwarded_ip + match_mapping_type: string + diff --git a/internal/builder/testdata/expected.existing.mappings.yml b/internal/builder/testdata/expected.existing.mappings.yml index 28f168641..deb158106 100644 --- a/internal/builder/testdata/expected.existing.mappings.yml +++ b/internal/builder/testdata/expected.existing.mappings.yml @@ -6,10 +6,11 @@ elasticsearch: example: type: short dynamic_templates: - - to_nested: - path: trigger + - forwarded_ip_to_ip: mapping: - type: nested + type: ip + match: forwarded_ip + match_mapping_type: string - _embedded_ecs-example_template: mapping: type: short