From 3c18ec4db531197d0593bc7ca5d9098c28fd40f7 Mon Sep 17 00:00:00 2001 From: Anthony McGreevy <95239463+amcgreevy-r7@users.noreply.github.com> Date: Sun, 2 Jun 2024 12:03:26 +0100 Subject: [PATCH] NO-ENDPOINT: Updated OpenSearch Schema (#139) Updated OpenSearch schema to correct data stream name for the new format and added schema definition of error indexes. Without the error index definition, OpenSearch defaults to using 10 shards for the error index which is very wasteful, with 5 primary and 5 replicas. --- schema/policies/rollover_strategy.json | 4 ++-- schema/templates/error.json | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 schema/templates/error.json diff --git a/schema/policies/rollover_strategy.json b/schema/policies/rollover_strategy.json index a1dadde..136a300 100644 --- a/schema/policies/rollover_strategy.json +++ b/schema/policies/rollover_strategy.json @@ -31,8 +31,8 @@ } ], "ism_template": { - "index_patterns": ["*_results*"], - "priority": 101 + "index_patterns": ["*_transient*"], + "priority": 300 } } } \ No newline at end of file diff --git a/schema/templates/error.json b/schema/templates/error.json new file mode 100644 index 0000000..f49366a --- /dev/null +++ b/schema/templates/error.json @@ -0,0 +1,22 @@ +{ + "index_patterns": [ + "*_error" + ], + "template": { + "settings": { + "number_of_shards": 1, + "number_of_replicas": 0 + }, + "mappings": { + "dynamic": false, + "properties": { + "client_id": { + "type": "keyword" + }, + "data": { + "type": "text" + } + } + } + } +} \ No newline at end of file