Open klacabane opened 2 years ago
According to these tests this is not the way to define the nested properties. So if we flatten the child property with the dotted syntax the mapping will be correctly created. What's curious is that a mix of nested and flattened properties also works while only nested props don't
# works
- name: test_nested_fields
type: nested
- name: test_nested_fields.first
type: keyword
# works
- name: test_nested_fields
type: nested
fields:
- name: second
type: keyword
- name: test_nested_fields.first
type: keyword
# does not work
- name: test_nested_fields
type: nested
fields:
- name: first
type: keyword
Summary
When mapping a nested object in a package's data stream, only the top level object is defined in the mapping and any child properties of that object is discarded. _generateMappings seems to be the function responsible for the translation.
Steps to reproduce the issue
elastic-package build -v
elastic-package stack up -v -d
test_nested_fields
object is defined without any child properties