mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-11-24 02:31:13 +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)
This commit is contained in:
parent
4767a8215e
commit
ea51ce062e
@ -500,6 +500,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()));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1636,7 +1636,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