Fix implementation of explicit refresh policy.

Original Pull Request #2908
Closes #2907
This commit is contained in:
Peter-Josef Meisch 2024-05-10 09:33:39 +02:00 committed by GitHub
parent dc5bf5a606
commit 94a40a7a75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -457,9 +457,7 @@ public class SimpleElasticsearchRepository<T, ID> implements ElasticsearchReposi
@Nullable
public <R> R executeAndRefresh(OperationsCallback<R> callback, @Nullable RefreshPolicy refreshPolicy) {
R result = callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
doRefresh();
return result;
return callback.doWithOperations(operations.withRefreshPolicy(refreshPolicy));
}
// endregion
}