From d5697bd8d44c4dd099851993d59505c342e847be Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 30 Dec 2024 17:35:56 +0100 Subject: [PATCH] Don't index rally.* fields in elastic/logs track (#718) * Don't index rally.* fields * Fallback to runtime field incase of standard index mode --- .../component/track-custom-mappings.json | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/elastic/logs/templates/component/track-custom-mappings.json b/elastic/logs/templates/component/track-custom-mappings.json index 65ac8bee..84e2e37e 100644 --- a/elastic/logs/templates/component/track-custom-mappings.json +++ b/elastic/logs/templates/component/track-custom-mappings.json @@ -1,6 +1,15 @@ { "template" : { "mappings" : { + {% if index_mode | default('standard') is equalto 'standard' %} + "runtime": { + "rally.doc_size": { + "type": "long" + }, + "rally.message_size": { + "type": "long" + } + },{% endif %} "properties" : { "event": { "properties": { @@ -13,17 +22,19 @@ "format": "strict_date_optional_time" } } - }, + }{% if index_mode | default('standard') is equalto 'logsdb' %}, "rally": { "properties" : { "doc_size": { - "type": "long" + "type": "long", + "index": false }, "message_size": { - "type": "long" + "type": "long", + "index": false } } - } + }{% endif %} } } },