mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-15 16:42:11 +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.Pageable;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
import org.springframework.data.elasticsearch.client.erhlc.NativeSearchQueryBuilder;
|
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.MultiGetItem;
|
||||||
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations;
|
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations;
|
||||||
import org.springframework.data.elasticsearch.core.ReactiveIndexOperations;
|
import org.springframework.data.elasticsearch.core.ReactiveIndexOperations;
|
||||||
@ -245,8 +245,8 @@ public class SimpleReactiveElasticsearchRepository<T, ID> implements ReactiveEla
|
|||||||
private Mono<Void> doRefresh() {
|
private Mono<Void> doRefresh() {
|
||||||
RefreshPolicy refreshPolicy = null;
|
RefreshPolicy refreshPolicy = null;
|
||||||
|
|
||||||
if (operations instanceof ReactiveElasticsearchTemplate) {
|
if (operations instanceof AbstractReactiveElasticsearchTemplate template) {
|
||||||
refreshPolicy = ((ReactiveElasticsearchTemplate) operations).getRefreshPolicy();
|
refreshPolicy = template.getRefreshPolicy();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (refreshPolicy == null) {
|
if (refreshPolicy == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user