mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-07-28 13:13:26 +00:00
Fix missing return value in ByQueryResponse.
Original Pull Request #3109 Closes #3108 Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com> (cherry picked from commit ebbe242a7228d7f573b8a25f0565060e2c0fa528) (cherry picked from commit ea51ce062e15380fadf00c93184f74c1baf0c33c)
This commit is contained in:
parent
144d388203
commit
2772c5f3d5
@ -497,6 +497,10 @@ class ResponseConverter {
|
|||||||
builder.withDeleted(response.deleted());
|
builder.withDeleted(response.deleted());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(response.updated() != null) {
|
||||||
|
builder.withUpdated(response.updated());
|
||||||
|
}
|
||||||
|
|
||||||
if (response.batches() != null) {
|
if (response.batches() != null) {
|
||||||
builder.withBatches(Math.toIntExact(response.batches()));
|
builder.withBatches(Math.toIntExact(response.batches()));
|
||||||
}
|
}
|
||||||
|
@ -1634,7 +1634,9 @@ public abstract class ElasticsearchIntegrationTests {
|
|||||||
.withParams(Collections.singletonMap("newMessage", messageAfterUpdate)).withAbortOnVersionConflict(true)
|
.withParams(Collections.singletonMap("newMessage", messageAfterUpdate)).withAbortOnVersionConflict(true)
|
||||||
.build();
|
.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,
|
SampleEntity indexedEntity = operations.get(documentId, SampleEntity.class,
|
||||||
IndexCoordinates.of(indexNameProvider.indexName()));
|
IndexCoordinates.of(indexNameProvider.indexName()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user