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
Add option to track array source in ObjectMapper #108496
Add option to track array source in ObjectMapper #108496
Conversation
… fix/synthetic-source/array
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
@@ -242,6 +250,9 @@ protected static boolean parseObjectOrDocumentTypeProperties( | |||
} else if (fieldName.equals("enabled")) { | |||
builder.enabled(XContentMapValues.nodeBooleanValue(fieldNode, fieldName + ".enabled")); | |||
return true; | |||
} else if (fieldName.equals("track_array_source")) { |
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.
Maybe turn the name into a constant? I think store_array_source
maybe be better. This name is inline with the store
param and the source mode when we store the source.
Maybe store_source
is better if we like to extend this functionally for other fields as well?
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.
store_array_source
sounds good. I think it's better to avoid a catch-all param since each one may have substantial impact on storage. We can add one in the future if we prefer so.
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.
lgtm
The new option,
store_array_source
, will be used to control when to track the source for arrays of objects within objects that have this option set. This only applies to indexes with synthetic source mode.Related to #90708