diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java index c5c17d8a8..e4d1da6e2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java @@ -457,9 +457,7 @@ public R executeAndRefresh(OperationsCallback callback) { @Nullable public R executeAndRefresh(OperationsCallback callback, @Nullable RefreshPolicy refreshPolicy) { - R result = callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy)); - doRefresh(); - return result; + return callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy)); } // endregion }