@Service public class EsIndexServiceImpl extends Object implements EsIndexService
构造器和说明 |
---|
EsIndexServiceImpl() |
限定符和类型 | 方法和说明 |
---|---|
<T> boolean |
createIndex(Class<T> clazz)
创建索引
|
boolean |
createIndex(org.elasticsearch.client.indices.CreateIndexRequest request)
创建索引
|
<T> boolean |
deleteIndex(Class<T> clazz)
删除索引
|
boolean |
deleteIndex(String indexName)
删除
|
boolean |
existsIndex(String indexName)
索引是否存在
|
public <T> boolean createIndex(Class<T> clazz)
EsIndexService
createIndex
在接口中 EsIndexService
clazz
- 注解使用请参照 spring-data-elasticsearch
org.springframework.data.annotation.Id;
org.springframework.data.elasticsearch.annotations.DateFormat;
org.springframework.data.elasticsearch.annotations.Document;
org.springframework.data.elasticsearch.annotations.Field;
org.springframework.data.elasticsearch.annotations.FieldType;public boolean createIndex(org.elasticsearch.client.indices.CreateIndexRequest request)
EsIndexService
createIndex
在接口中 EsIndexService
request
- 索引参数public <T> boolean deleteIndex(Class<T> clazz)
EsIndexService
deleteIndex
在接口中 EsIndexService
clazz
- 注解使用请参照 spring-data-elasticsearch
org.springframework.data.annotation.Id;
org.springframework.data.elasticsearch.annotations.DateFormat;
org.springframework.data.elasticsearch.annotations.Document;
org.springframework.data.elasticsearch.annotations.Field;
org.springframework.data.elasticsearch.annotations.FieldType;public boolean deleteIndex(String indexName)
EsIndexService
deleteIndex
在接口中 EsIndexService
indexName
- 索引名public boolean existsIndex(String indexName)
EsIndexService
existsIndex
在接口中 EsIndexService
indexName
- 索引名