update elasticsearch client to v6.8.8
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
<commons-io.version>2.6</commons-io.version>
|
||||
<servlet-api.version>4.0.1</servlet-api.version>
|
||||
<spring-data-elasticsearch.version>3.2.5.RELEASE</spring-data-elasticsearch.version>
|
||||
<elasticsearch.version>6.8.8</elasticsearch.version>
|
||||
<docker-maven-plugin.version>1.2.2</docker-maven-plugin.version>
|
||||
<sonar.exclusions>zlt-job/**/*, zlt-register/**/*, zlt-web/**/*</sonar.exclusions>
|
||||
<docker.baseImage>openjdk:8-jre-alpine</docker.baseImage>
|
||||
@@ -348,6 +349,21 @@
|
||||
<artifactId>spring-data-elasticsearch</artifactId>
|
||||
<version>${spring-data-elasticsearch.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
||||
<version>${elasticsearch.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch.client</groupId>
|
||||
<artifactId>elasticsearch-rest-client</artifactId>
|
||||
<version>${elasticsearch.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch</artifactId>
|
||||
<version>${elasticsearch.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
+2
-2
@@ -12,9 +12,9 @@ import org.apache.http.util.EntityUtils;
|
||||
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
|
||||
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
|
||||
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
|
||||
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
|
||||
import org.elasticsearch.action.admin.indices.get.GetIndexRequest;
|
||||
import org.elasticsearch.action.admin.indices.get.GetIndexResponse;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.client.Request;
|
||||
import org.elasticsearch.client.RequestOptions;
|
||||
import org.elasticsearch.client.Response;
|
||||
@@ -66,7 +66,7 @@ public class IndexServiceImpl implements IIndexService {
|
||||
@Override
|
||||
public boolean delete(String indexName) throws IOException {
|
||||
DeleteIndexRequest request = new DeleteIndexRequest(indexName);
|
||||
DeleteIndexResponse response = elasticsearchRestTemplate.getClient().indices().delete(request, RequestOptions.DEFAULT);
|
||||
AcknowledgedResponse response = elasticsearchRestTemplate.getClient().indices().delete(request, RequestOptions.DEFAULT);
|
||||
return response.isAcknowledged();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user