Skip to content

Commit 94a40a7

Browse files
authored
Fix implementation of explicit refresh policy.
Original Pull Request #2908 Closes #2907
1 parent dc5bf5a commit 94a40a7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,7 @@ public <R> R executeAndRefresh(OperationsCallback<R> callback) {
457457

458458
@Nullable
459459
public <R> R executeAndRefresh(OperationsCallback<R> callback, @Nullable RefreshPolicy refreshPolicy) {
460-
R result = callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
461-
doRefresh();
462-
return result;
460+
return callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
463461
}
464462
// endregion
465463
}

0 commit comments

Comments
 (0)