From 52b0c7e7263f0dff6de0a7e80989886d56661426 Mon Sep 17 00:00:00 2001 From: Edwin Lawrance Date: Mon, 16 Jul 2018 19:55:15 +0100 Subject: ES payload translation & dynamic template config Configs for ElasticSearch 6.1.2 Payload translation is to comply new version Dynamic template is for mapping "string" typed dynamic fields Change-Id: I3735fb20da2b9e9fcc99dbf9322a6063ab1cfe1e Issue-ID: AAI-1376 Signed-off-by: Edwin Lawrance --- .../resources/config/dynamic-custom-template.json | 12 ++++++++++++ .../resources/config/es-payload-translation.json | 20 ++++++++++++++++++++ .../charts/aai-search-data/templates/deployment.yaml | 8 +++++++- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 kubernetes/aai/charts/aai-search-data/resources/config/dynamic-custom-template.json create mode 100644 kubernetes/aai/charts/aai-search-data/resources/config/es-payload-translation.json (limited to 'kubernetes/aai/charts/aai-search-data') diff --git a/kubernetes/aai/charts/aai-search-data/resources/config/dynamic-custom-template.json b/kubernetes/aai/charts/aai-search-data/resources/config/dynamic-custom-template.json new file mode 100644 index 0000000000..2dac8f75c7 --- /dev/null +++ b/kubernetes/aai/charts/aai-search-data/resources/config/dynamic-custom-template.json @@ -0,0 +1,12 @@ +"dynamic_templates":[ + { + "strings":{ + "match_mapping_type":"string", + "match": "*", + "mapping":{ + "type":"text", + "fielddata":true + } + } + } +], diff --git a/kubernetes/aai/charts/aai-search-data/resources/config/es-payload-translation.json b/kubernetes/aai/charts/aai-search-data/resources/config/es-payload-translation.json new file mode 100644 index 0000000000..93888befbc --- /dev/null +++ b/kubernetes/aai/charts/aai-search-data/resources/config/es-payload-translation.json @@ -0,0 +1,20 @@ +{ + "attr-translations": [ + { + "from": "\"type\":\"string\",\"index\":\"analyzed\"", + "to": "\"type\":\"text\",\"index\":\"true\"" + }, + { + "from": "\"type\":\"string\",\"index\":\"not_analyzed\"", + "to": "\"type\":\"keyword\",\"index\":\"true\"" + }, + { + "from": "\"type\":\"string\"", + "to": "\"type\":\"text\"" + }, + { + "from": "searchable", + "to": "index" + } + ] +} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml b/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml index c841c383e9..fe94e1e159 100644 --- a/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-search-data/templates/deployment.yaml @@ -56,7 +56,13 @@ spec: subPath: elastic-search.properties name: {{ include "common.fullname" . }}-service-config - mountPath: /opt/app/search-data-service/config/analysis-config.json - subPath: filter-config.json + subPath: analysis-config.json + name: {{ include "common.fullname" . }}-service-config + - mountPath: /opt/app/search-data-service/config/es-payload-translation.json + subPath: es-payload-translation.json + name: {{ include "common.fullname" . }}-service-config + - mountPath: /opt/app/search-data-service/config/dynamic-custom-template.json + subPath: dynamic-custom-template.json name: {{ include "common.fullname" . }}-service-config - mountPath: /opt/app/search-data-service/config/auth/tomcat_keystore subPath: tomcat_keystore -- cgit 1.2.3-korg