-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Set strings to be keywords by default #2688
Conversation
I tested the change with ES 5.0, I'm the process of testing with ES 2.4. |
@@ -11,14 +11,13 @@ | |||
}, | |||
"dynamic_templates": [ | |||
{ | |||
"fields": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that you gave it a name. Makes it much more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it used to be the name of the dict/list field name. Now if everything is a keyword by default, the template also gets shorter, because we don't have dicts or lists of type text
.
LGTM. This is a great addition to the #2627, in order to have a better upgrading support. |
Tested with ES 2.4, seems to be working OK. |
This adds a dynamic mapping to all our template files to set strings to be keywords by default. Previously we were using the default of `text` and only switching to `keyword` when configured in `fields.yml`. This reverses the logic and sets mappings to `text` only when requested in `fields.yml`. The goal is to make upgrading the mapping template less painful. In the Beats we have so far, unexpected fields are better of as keywords.
1fa4698
to
f414869
Compare
Added a Changelog entry. This could go in when green from my point of view. |
This adds a dynamic mapping to all our template files to set strings to be keywords by default. Previously we were using the default of `text` and only switching to `keyword` when configured in `fields.yml`. This reverses the logic and sets mappings to `text` only when requested in `fields.yml`. The goal is to make upgrading the mapping template less painful. In the Beats we have so far, unexpected fields are better of as keywords.
Backport: Set strings to be keywords by default (#2688)
This adds a dynamic mapping to all our template files to set strings to be keywords by default. Previously we were using the default of `text` and only switching to `keyword` when configured in `fields.yml`. This reverses the logic and sets mappings to `text` only when requested in `fields.yml`. The goal is to make upgrading the mapping template less painful. In the Beats we have so far, unexpected fields are better of as keywords.
Backport: Set strings to be keywords by default (elastic#2688)
This adds a dynamic mapping to all our template files to set strings to be
keywords by default.
Previously we were using the default of
text
and only switching tokeyword
when configured in
fields.yml
. This reverses the logic and sets mappings totext
only when requested infields.yml
.The goal is to make upgrading the mapping template less painful. In the Beats
we have so far, unexpected fields are better of as keywords.