Fix implementation of explicit refresh policy.

Original Pull Request #2908
Closes #2907

(cherry picked from commit 94a40a7a752b6cf797d3e75fffe128f77f1c8468)
This commit is contained in:
Peter-Josef Meisch 2024-05-10 09:33:39 +02:00
parent ed18be6f1c
commit c81958f62d
No known key found for this signature in database
GPG Key ID: DE108246970C7708

View File

@ -453,9 +453,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
}