Skip to content

Commit

Permalink
Remove _all from our templates
Browse files Browse the repository at this point in the history
This is a temporary workaround for elastic#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
Tudor Golubenco committed Jan 13, 2017
1 parent 760290f commit a169924
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 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
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 a169924

Please sign in to comment.