-
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
Allow multiple object types per field. #9772
Allow multiple object types per field. #9772
Conversation
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.
Could you add a changelog entry and make Hound happy?
…amic-templates-per-field
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.
Interesting addition. Only some small comments.
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.
Thanks for addressing the PR comments, this LGTM, I am only wondering now if object_type_params
is a good name for this, but I don't have a better proposal...
Failing tests should be solved in master, could you please update to see all green?
@ruflin PR is ready for another review, failing tests are unrelated from what I see. |
…amic-templates-per-field
@@ -119,20 +121,28 @@ func (p *Processor) integer(f *common.Field) common.MapStr { | |||
return property | |||
} | |||
|
|||
func (p *Processor) scaledFloat(f *common.Field) common.MapStr { | |||
func (p *Processor) scaledFloat(f *common.Field, params ...common.MapStr) common.MapStr { | |||
property := getDefaultProperties(f) | |||
property["type"] = "scaled_float" | |||
|
|||
if p.EsVersion.IsMajor(2) { |
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.
@urso Not related to this PR but stumbled over it here. Should we remove these checks in master to clean up the code? 7.0 with 2 is not really supported.
Allow configuring multiple object types for the same field, to allow creating multiple dynamic templates on dynamic attributes, where keys are unknown.
Usage:
precondition for elastic/apm-server#1712