类 ElasticOperate
java.lang.Object
cn.warpin.core.database.elastic.ElasticOperate
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明<T> co.elastic.clients.elasticsearch.core.IndexResponsecreateOrUpdateDocument(ElasticParams<T> params) 创建或更新文档co.elastic.clients.elasticsearch.core.DeleteByQueryResponsedeleteAllDocumentsInIndex(String index) 删除索引下所有文档co.elastic.clients.elasticsearch.core.DeleteResponsedeleteDocument(String index, String id) 删除指定文档booleandeleteIndex(String index) 删除整个索引private booleanindexExists(String index) 检测索引是否存在<T> SearchResult<T> searchDocuments(ElasticCondition<T> condition) 查询文档
-
字段详细资料
-
client
private final co.elastic.clients.elasticsearch.ElasticsearchClient client
-
-
构造器详细资料
-
ElasticOperate
public ElasticOperate()
-
-
方法详细资料
-
createOrUpdateDocument
public <T> co.elastic.clients.elasticsearch.core.IndexResponse createOrUpdateDocument(ElasticParams<T> params) 创建或更新文档- 类型参数:
T-- 参数:
params-- 返回:
- 抛出:
IOException
-
searchDocuments
查询文档- 类型参数:
T-- 参数:
condition-- 返回:
-
deleteDocument
删除指定文档- 参数:
index-id-- 返回:
- 抛出:
IOException
-
deleteAllDocumentsInIndex
public co.elastic.clients.elasticsearch.core.DeleteByQueryResponse deleteAllDocumentsInIndex(String index) 删除索引下所有文档- 参数:
index-- 返回:
-
deleteIndex
删除整个索引- 参数:
index-- 返回:
- 抛出:
IOException
-
indexExists
检测索引是否存在- 参数:
index-- 返回:
- 抛出:
IOException
-