You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use some code like below to a script execution request in the bulk update operation.
var builder = new BulkRequest.Builder().index(index);
for (T t : list) {
final var uo = new UpdateOperation.Builder<Map<String, String>, T>().index(index).retryOnConflict(3);
final var id = documentId.documentId(t);
if (id != null) {
uo.id(id);
}
// Using script
final var ac = UpdateAction.<Map<String, String>, T>of(a -> a.scriptedUpsert(true)
.upsert(emptyMap())
.script(Script.of(s -> s.stored(ss -> ss.id(scriptId)
.params("version", JsonData.of(System.currentTimeMillis()))
.params("data", JsonData.of(t))))));
UpdateOperation<Map<String, String>, T> up = uo.action(ac).build();
builder.operations(new BulkOperation.Builder().update(up).build());
}
BulkRequest request = builder.build();
The action part didn't get serialized into the final request body.
The text was updated successfully, but these errors were encountered:
Java API client version
8.13.2
Java version
17
Elasticsearch Version
8.11.3
Problem description
I use some code like below to a script execution request in the bulk update operation.
The action part didn't get serialized into the final request body.
The text was updated successfully, but these errors were encountered: