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 support for retrieving fields in bulk updates #12114
Conversation
Note that this pull request includes a REST test that fails in current master (reflecting that master does not currently support retrieving fields in bulk updates using any of the three forms) but passes with this pull request. |
@@ -329,6 +331,8 @@ public BulkRequest add(BytesReference data, @Nullable String defaultIndex, @Null | |||
versionType = VersionType.fromString(parser.text()); | |||
} else if ("_retry_on_conflict".equals(currentFieldName) || "_retryOnConflict".equals(currentFieldName)) { | |||
retryOnConflict = parser.intValue(); | |||
} else if ("fields".equals(currentFieldName)) { | |||
fields = Strings.splitStringByCommaToArray(parser.text()); |
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.
Should we parse an actual list instead of a comma-delimited string list? I know the update request uses splitStringByCommaToArray but I think it is different since it gets the value from a query_string parameter while here you can provide actual json?
I left one question about how we should parse this |
@jpountz I agree as this would be consistent with how we handle I also pushed a change that updates the bulk API documentation. |
LGTM |
This commit adds support to retrieve fields when using the bulk update API. This functionality was previously available for the update API but not for the bulk update API. Closes #11527
Add support for retrieving fields in bulk updates This commit adds support to retrieve fields when using the bulk update API. This functionality was previously available for the update API but not for the bulk update API. Closes #11527
This commit adds support to retrieve fields when using the bulk update API. This functionality was previously available for the update API
but not for the bulk update API.
Closes #11527