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

[1.x] Handle error.stack_trace case for ES 6.x template (#1176) #1177

Merged
merged 1 commit into from
Dec 8, 2020
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
2 changes: 1 addition & 1 deletion CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Thanks, you're awesome :-) -->

* Added a notice highlighting that the `tracing` fields are not nested under the
namespace `tracing.` #1162
* ES 6.x template data types will fallback to supported types. #1171
* ES 6.x template data types will fallback to supported types. #1171, #1176

#### Deprecated

Expand Down
7 changes: 7 additions & 0 deletions scripts/generators/es_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ def generate_template_version(elasticsearch_version, mappings_section, out_dir,
if elasticsearch_version == 6:
es6_mappings_section = copy.deepcopy(mappings_section)
es6_type_fallback(es6_mappings_section['properties'])

# error.stack_trace needs special handling to set
# index: false and doc_values: false
error_stack_trace_mappings = es6_mappings_section['properties']['error']['properties']['stack_trace']
error_stack_trace_mappings.setdefault('index', False)
error_stack_trace_mappings.setdefault('doc_values', False)

template['mappings'] = {'_doc': es6_mappings_section}
else:
template['mappings'] = mappings_section
Expand Down