Skip to content

Commit

Permalink
Bring back the _all field in 5.x
Browse files Browse the repository at this point in the history
This is a temporary solution for elastic#3368, to avoid a breaking change
in 5.x.
  • Loading branch information
Tudor Golubenco committed Feb 7, 2017
1 parent 61ef81c commit f56ad2c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
3 changes: 3 additions & 0 deletions filebeat/filebeat.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "5.3.0"
},
Expand Down
3 changes: 3 additions & 0 deletions heartbeat/heartbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "5.3.0"
},
Expand Down
14 changes: 7 additions & 7 deletions libbeat/scripts/generate_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ 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"] = {
Expand All @@ -79,6 +72,13 @@ def fields_to_es_template(args, input, output, index, version):
# limit shouldn't be that bad.
template["settings"]["index.mapping.total_fields.limit"] = 10000

# 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
}

properties = {}
dynamic_templates = []

Expand Down
3 changes: 3 additions & 0 deletions metricbeat/metricbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "5.3.0"
},
Expand Down
3 changes: 3 additions & 0 deletions packetbeat/packetbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "5.3.0"
},
Expand Down
3 changes: 3 additions & 0 deletions winlogbeat/winlogbeat.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"mappings": {
"_default_": {
"_all": {
"norms": false
},
"_meta": {
"version": "5.3.0"
},
Expand Down

0 comments on commit f56ad2c

Please sign in to comment.