mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-13 23:52:10 +00:00
Use custom refresh policy in reactive repository with all clients.
Original Pull Request #2350 Closes #2349
This commit is contained in:
parent
744b3ed6b4
commit
049bcf504e
@ -22,7 +22,7 @@ import org.reactivestreams.Publisher;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.elasticsearch.client.erhlc.NativeSearchQueryBuilder;
|
||||
import org.springframework.data.elasticsearch.client.erhlc.ReactiveElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.core.AbstractReactiveElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.core.MultiGetItem;
|
||||
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations;
|
||||
import org.springframework.data.elasticsearch.core.ReactiveIndexOperations;
|
||||
@ -245,8 +245,8 @@ public class SimpleReactiveElasticsearchRepository<T, ID> implements ReactiveEla
|
||||
private Mono<Void> doRefresh() {
|
||||
RefreshPolicy refreshPolicy = null;
|
||||
|
||||
if (operations instanceof ReactiveElasticsearchTemplate) {
|
||||
refreshPolicy = ((ReactiveElasticsearchTemplate) operations).getRefreshPolicy();
|
||||
if (operations instanceof AbstractReactiveElasticsearchTemplate template) {
|
||||
refreshPolicy = template.getRefreshPolicy();
|
||||
}
|
||||
|
||||
if (refreshPolicy == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user