From 8dbed3c3c98c6ee19bd2792995e95631f498d27a Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Wed, 6 Feb 2019 16:37:21 +0200 Subject: [PATCH] Allow _doc type in master https://github.com/elastic/elasticsearch/pull/38270 made current master (7.0.0) reject mappings with type `_doc` unless `?include_type_name=true` is passed during index creation. Workaround the rejection for now by explicitly setting `include_type_name` to `true` in every create_index operation. --- eventdata/challenges/default.json | 5 ++++- geonames/challenges/default.json | 16 ++++++++++++++-- geopoint/challenges/default.json | 13 +++++++++++-- http_logs/challenges/default.json | 23 +++++++++++++++++++---- nested/challenges/default.json | 10 ++++++++-- nyc_taxis/challenges/default.json | 23 +++++++++++++++++++---- percolator/challenges/default.json | 5 ++++- pmc/challenges/default.json | 16 ++++++++++++++-- so/challenges/default.json | 5 ++++- 9 files changed, 97 insertions(+), 19 deletions(-) diff --git a/eventdata/challenges/default.json b/eventdata/challenges/default.json index 7ba4624f..95df8682 100644 --- a/eventdata/challenges/default.json +++ b/eventdata/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { diff --git a/geonames/challenges/default.json b/geonames/challenges/default.json index df1ad938..11f29bf4 100644 --- a/geonames/challenges/default.json +++ b/geonames/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -195,7 +198,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -233,6 +239,9 @@ "settings": { "index.sort.field": ["country_code.raw", "admin1_code.raw"], "index.sort.order": ["asc", "asc"] + }, + "request-params": { + "include_type_name": "true" } } }, @@ -272,6 +281,9 @@ "index.refresh_interval": "30s", "index.number_of_shards": 6, "index.translog.flush_threshold_size": "4g" + }, + "request-params": { + "include_type_name": "true" } } }, diff --git a/geopoint/challenges/default.json b/geopoint/challenges/default.json index de9a0a36..867d609d 100644 --- a/geopoint/challenges/default.json +++ b/geopoint/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -82,7 +85,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -131,6 +137,9 @@ "index.refresh_interval": "30s", "index.number_of_shards": 6, "index.translog.flush_threshold_size": "4g" + }, + "request-params": { + "include_type_name": "true" } } }, diff --git a/http_logs/challenges/default.json b/http_logs/challenges/default.json index 6283a4d2..31d683db 100644 --- a/http_logs/challenges/default.json +++ b/http_logs/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -90,7 +93,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -138,6 +144,9 @@ "settings": { "index.sort.field": "@timestamp", "index.sort.order": "desc" + }, + "request-params": { + "include_type_name": "true" } } }, @@ -183,7 +192,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -234,7 +246,10 @@ "index.number_of_shards": {{number_of_shards | default(1)}}, "index.number_of_replicas": {{number_of_replicas | default(0)}}, "index.store.type": "{{store_type | default('mmapfs')}}" - }{%- endif %} + }{%- endif %}, + "request-params": { + "include_type_name": "true" + } } }, { diff --git a/nested/challenges/default.json b/nested/challenges/default.json index 5bafa486..7c545f9a 100644 --- a/nested/challenges/default.json +++ b/nested/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -104,7 +107,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { diff --git a/nyc_taxis/challenges/default.json b/nyc_taxis/challenges/default.json index 18321d32..1392b2e3 100644 --- a/nyc_taxis/challenges/default.json +++ b/nyc_taxis/challenges/default.json @@ -13,7 +13,10 @@ "index.codec": "best_compression", "index.refresh_interval": "30s", "index.translog.flush_threshold_size": "4g" - }{%- endif %} + }{%- endif %}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -88,7 +91,10 @@ "index.codec": "best_compression", "index.refresh_interval": "30s", "index.translog.flush_threshold_size": "4g" - }{%- endif %} + }{%- endif %}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -130,6 +136,9 @@ "index.translog.flush_threshold_size": "4g", "index.sort.field": "pickup_datetime", "index.sort.order": "desc" + }, + "request-params": { + "include_type_name": "true" } } }, @@ -169,7 +178,10 @@ "index.number_of_shards": {{number_of_shards | default(1)}}, "index.number_of_replicas": {{number_of_replicas | default(0)}}, "index.store.type": "{{store_type | default('mmapfs')}}" - }{%- endif %} + }{%- endif %}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -220,7 +232,10 @@ "index.codec": "best_compression", "index.refresh_interval": "30s", "index.translog.flush_threshold_size": "4g" - }{%- endif %} + }{%- endif %}, + "request-params": { + "include_type_name": "true" + } } }, { diff --git a/percolator/challenges/default.json b/percolator/challenges/default.json index 7a3e7ed6..88341e0e 100644 --- a/percolator/challenges/default.json +++ b/percolator/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { diff --git a/pmc/challenges/default.json b/pmc/challenges/default.json index 70f6f3c6..a5e4744e 100644 --- a/pmc/challenges/default.json +++ b/pmc/challenges/default.json @@ -12,7 +12,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -99,7 +102,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, { @@ -147,6 +153,9 @@ "settings": { "index.sort.field": "timestamp", "index.sort.order": "desc" + }, + "request-params": { + "include_type_name": "true" } } }, @@ -196,6 +205,9 @@ "index.refresh_interval": "30s", "index.number_of_shards": 6, "index.translog.flush_threshold_size": "4g" + }, + "request-params": { + "include_type_name": "true" } } }, diff --git a/so/challenges/default.json b/so/challenges/default.json index 7ba4624f..95df8682 100644 --- a/so/challenges/default.json +++ b/so/challenges/default.json @@ -9,7 +9,10 @@ { "operation": { "operation-type": "create-index", - "settings": {{index_settings | default({}) | tojson}} + "settings": {{index_settings | default({}) | tojson}}, + "request-params": { + "include_type_name": "true" + } } }, {