Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable default fields for Elasticsearch 6.x #11205

Merged
merged 3 commits into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ https://github.com/elastic/beats/compare/v6.6.0...6.x[Check the HEAD diff]
- Update the code of Central Management to align with the new returned format. {pull}10019[10019]
- Allow Central Management to send events back to kibana. {issue}9382[9382]
- Fix panic if fields settting is used to configure `hosts.x` fields. {issue}10824[10824] {pull}10935[10935]
- Introduce query.default_field as part of the template. {pull}11205[11205]

*Auditbeat*

Expand Down
3 changes: 2 additions & 1 deletion libbeat/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ func buildIdxSettings(ver common.Version, userSettings common.MapStr) common.Map
indexSettings.Put("number_of_routing_shards", defaultNumberOfRoutingShards)
}

if ver.Major >= 7 {
// 6.0 is excluded because it did not support an array for query.default_field
if ver.Major >= 6 && !(ver.Major == 6 && ver.Minor == 0) {
// copy defaultFields, as defaultFields is shared global slice.
fields := make([]string, len(defaultFields))
copy(fields, defaultFields)
Expand Down