Skip to content

Commit

Permalink
Remove _all from our templates (#3369)
Browse files Browse the repository at this point in the history
This is a temporary workaround for #3368. We'll need to add the `_all` setting
only in the 2x/5x versions of the templates. Should fix the builds.
  • Loading branch information
tsg authored and ruflin committed Jan 13, 2017
1 parent 760290f commit a4a5de3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 26 deletions.
3 changes: 0 additions & 3 deletions filebeat/filebeat.template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "6.0.0-alpha1"
},
Expand Down
3 changes: 0 additions & 3 deletions heartbeat/heartbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "6.0.0-alpha1"
},
Expand Down
16 changes: 11 additions & 5 deletions libbeat/scripts/generate_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def fields_to_es_template(args, input, output, index, version):
},
"mappings": {
"_default_": {
"_all": {
"norms": False
},
"properties": {},
"_meta": {
"version": version,
Expand All @@ -61,10 +58,19 @@ def fields_to_es_template(args, input, output, index, version):
}
}

# should be done only for es5x. For es6x, any "_all" setting results
# in an error.
# TODO: https://github.com/elastic/beats/issues/3368
# template["mappings"]["_default"]["_all"] = {
# "norms": False
# }

if args.es2x:
# different syntax for norms
template["mappings"]["_default_"]["_all"]["norms"] = {
"enabled": False
template["mappings"]["_default_"]["_all"] = {
"norms": {
"enabled": False
}
}
else:
# For ES 5.x, increase the limit on the max number of fields.
Expand Down
6 changes: 0 additions & 6 deletions libbeat/tests/files/template.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
{
"template1": {
Expand Down
3 changes: 0 additions & 3 deletions metricbeat/metricbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "6.0.0-alpha1"
},
Expand Down
3 changes: 0 additions & 3 deletions packetbeat/packetbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "6.0.0-alpha1"
},
Expand Down
3 changes: 0 additions & 3 deletions winlogbeat/winlogbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "6.0.0-alpha1"
},
Expand Down

0 comments on commit a4a5de3

Please sign in to comment.