Fix missing return value in ByQueryResponse.

Original Pull Request #3109
Closes #3108

Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
This commit is contained in:
Peter-Josef Meisch 2025-05-14 13:53:58 +02:00 committed by GitHub
parent 0ce9a1c400
commit ebbe242a72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -498,6 +498,10 @@ class ResponseConverter {
builder.withDeleted(response.deleted());
}
if(response.updated() != null) {
builder.withUpdated(response.updated());
}
if (response.batches() != null) {
builder.withBatches(Math.toIntExact(response.batches()));
}

View File

@ -1636,7 +1636,9 @@ public abstract class ElasticsearchIntegrationTests {
.withParams(Collections.singletonMap("newMessage", messageAfterUpdate)).withAbortOnVersionConflict(true)
.build();
operations.updateByQuery(updateQuery, IndexCoordinates.of(indexNameProvider.indexName()));
var byQueryResponse = operations.updateByQuery(updateQuery, IndexCoordinates.of(indexNameProvider.indexName()));
assertThat(byQueryResponse.getUpdated()).isEqualTo(1);
SampleEntity indexedEntity = operations.get(documentId, SampleEntity.class,
IndexCoordinates.of(indexNameProvider.indexName()));