|
1 | 1 | /* |
2 | | - * Copyright 2012-2020 the original author or authors. |
| 2 | + * Copyright 2012-2021 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
17 | 17 | package org.springframework.boot.autoconfigure.data.elasticsearch; |
18 | 18 |
|
19 | 19 | import org.elasticsearch.action.support.IndicesOptions; |
20 | | -import org.elasticsearch.action.support.WriteRequest; |
21 | 20 | import org.elasticsearch.client.RestHighLevelClient; |
22 | 21 |
|
23 | 22 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; |
|
30 | 29 | import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; |
31 | 30 | import org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations; |
32 | 31 | import org.springframework.data.elasticsearch.core.ReactiveElasticsearchTemplate; |
| 32 | +import org.springframework.data.elasticsearch.core.RefreshPolicy; |
33 | 33 | import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; |
34 | 34 | import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter; |
35 | 35 | import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; |
@@ -87,7 +87,7 @@ ReactiveElasticsearchTemplate reactiveElasticsearchTemplate(ReactiveElasticsearc |
87 | 87 | ElasticsearchConverter converter) { |
88 | 88 | ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter); |
89 | 89 | template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed()); |
90 | | - template.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE); |
| 90 | + template.setRefreshPolicy(RefreshPolicy.IMMEDIATE); |
91 | 91 | return template; |
92 | 92 | } |
93 | 93 |
|
|
0 commit comments