-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix matching of leaf fields for objects (#2054)
Validation of objects was happening only depending of the format. If there were no subobjects, the validation was happening, and if there were objects with subfields, the validation was not happening for the subfields. This leads to different results with different mapping settings for the same data. For example depending if synthetics source or `subobjects: false` is used. Additionally, for subfields that should match the definition of the parent object, there were cases where this match was not happening, so the test could unexpectedly fail. Even if usually it is recommended to add explicit wildcards in dynamic mappings, definitions like the following one are expected to match subfields, but currently they aren't. ``` - name: user type: group fields: - name: names type: object object_type: keyword description: Array of user identification documents. ``` The definition above would not match for `user.names.db`.
- Loading branch information
Showing
5 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,6 @@ | |
- array | ||
- name: user.group.id | ||
type: keyword | ||
- name: attributes | ||
type: object | ||
object_type: keyword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"attributes.id": "foo", | ||
"attributes.status": "ok" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"attributes": { | ||
"id": "42", | ||
"status": "ok" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters