Skip to content

Commit c81958f

Browse files
committed
Fix implementation of explicit refresh policy.
Original Pull Request #2908 Closes #2907 (cherry picked from commit 94a40a7)
1 parent ed18be6 commit c81958f

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
@@ -453,9 +453,7 @@ public <R> R executeAndRefresh(OperationsCallback<R> callback) {
453453

454454
@Nullable
455455
public <R> R executeAndRefresh(OperationsCallback<R> callback, @Nullable RefreshPolicy refreshPolicy) {
456-
R result = callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
457-
doRefresh();
458-
return result;
456+
return callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
459457
}
460458
// endregion
461459
}

0 commit comments

Comments
 (0)