Skip to content

Commit

Permalink
Allow _doc type in master
Browse files Browse the repository at this point in the history
elastic/elasticsearch#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.

Relates: #64
  • Loading branch information
dliappis committed Feb 6, 2019
1 parent 0c76839 commit 602a838
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 21 deletions.
5 changes: 4 additions & 1 deletion eventdata/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down
16 changes: 14 additions & 2 deletions geonames/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
Expand Down Expand Up @@ -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"
}
}
},
Expand Down
13 changes: 11 additions & 2 deletions geopoint/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
Expand Down
23 changes: 19 additions & 4 deletions http_logs/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -138,6 +144,9 @@
"settings": {
"index.sort.field": "@timestamp",
"index.sort.order": "desc"
},
"request-params": {
"include_type_name": "true"
}
}
},
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down
10 changes: 8 additions & 2 deletions nested/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down
10 changes: 8 additions & 2 deletions noaa/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -111,7 +114,10 @@
{
"operation": {
"operation-type": "create-index",
"settings": {{index_settings | default({}) | tojson}}
"settings": {{index_settings | default({}) | tojson}},
"request-params": {
"include_type_name": "true"
}
}
},
{
Expand Down
23 changes: 19 additions & 4 deletions nyc_taxis/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down
5 changes: 4 additions & 1 deletion percolator/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down
16 changes: 14 additions & 2 deletions pmc/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -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"
}
}
},
{
Expand Down Expand Up @@ -147,6 +153,9 @@
"settings": {
"index.sort.field": "timestamp",
"index.sort.order": "desc"
},
"request-params": {
"include_type_name": "true"
}
}
},
Expand Down Expand Up @@ -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"
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion so/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
{
Expand Down

0 comments on commit 602a838

Please sign in to comment.