Skip to content

Commit

Permalink
feat: include alias path when generating template
Browse files Browse the repository at this point in the history
  • Loading branch information
rgmz authored Jun 25, 2020
1 parent ae68cbe commit 9864f19
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/generators/es_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ def entry_for(field):
ecs_helpers.dict_copy_existing_keys(field, field_entry, ['ignore_above'])
elif field['type'] == 'text':
ecs_helpers.dict_copy_existing_keys(field, field_entry, ['norms'])
elif field['type'] == 'alias':
if 'path' in field:
field_entry['path'] = field['path']
else:
raise ValueError(f'The [path] property must be specified for field [{field["name"]}]')

if 'multi_fields' in field:
field_entry['fields'] = {}
Expand Down

0 comments on commit 9864f19

Please sign in to comment.