Skip to content
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

Conversation

kkrik-es
Copy link
Contributor

@kkrik-es kkrik-es commented May 10, 2024

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

@kkrik-es kkrik-es self-assigned this May 10, 2024
@kkrik-es kkrik-es requested a review from martijnvg May 13, 2024 06:40
@kkrik-es kkrik-es marked this pull request as ready for review May 13, 2024 06:40
@elasticsearchmachine
Copy link
Collaborator

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")) {
Copy link
Member

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?

Copy link
Contributor Author

@kkrik-es kkrik-es May 13, 2024

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.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kkrik-es kkrik-es added the auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label May 13, 2024
@elasticsearchmachine elasticsearchmachine merged commit 7835845 into elastic:main May 13, 2024
15 checks passed
@kkrik-es kkrik-es deleted the fix/synthetic-source/track-array-source branch May 13, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >non-issue :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants