Skip to content

Commit

Permalink
Enable default fields for Elasticsearch 6.x
Browse files Browse the repository at this point in the history
Previously default_fields were only enabled for Elasticsearch 7.x. For the migration it is required that also indices from Elasticsearch 6.x have the default_field option set. This enables it for 6.x.

Closes elastic#11187
  • Loading branch information
ruflin committed Mar 12, 2019
1 parent 065ccc4 commit f6fe487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libbeat/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func buildIdxSettings(ver common.Version, userSettings common.MapStr) common.Map
indexSettings.Put("number_of_routing_shards", defaultNumberOfRoutingShards)
}

if ver.Major >= 7 {
if ver.Major >= 6 {
// copy defaultFields, as defaultFields is shared global slice.
fields := make([]string, len(defaultFields))
copy(fields, defaultFields)
Expand Down

0 comments on commit f6fe487

Please sign in to comment.