public class ESFactory extends Object implements IESFactory
| 构造器和说明 |
|---|
ESFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.elasticsearch.action.support.master.AcknowledgedResponse |
delete(String index)
删除索引及数据
|
org.elasticsearch.action.delete.DeleteResponse |
delete(String index,
String type,
String id)
通过id删除数据
|
ESSearchBuilder |
getBuilder()
获取构造器
|
org.elasticsearch.client.RestHighLevelClient |
getClient()
获取链接
|
AbstractESQuery |
getQuery()
获取es查询实现类
|
org.elasticsearch.action.index.IndexResponse |
insert(String data,
String index,
String type)
新增
|
<T> org.elasticsearch.action.index.IndexResponse |
insert(T t)
插入
|
<T> org.elasticsearch.action.index.IndexResponse |
insert(T t,
String index,
String type)
新增
|
void |
setClient(org.elasticsearch.client.RestHighLevelClient client) |
void |
setName(String name) |
org.elasticsearch.action.update.UpdateResponse |
update(String data,
String index,
String type,
String id)
数据更新
|
<T> org.elasticsearch.action.update.UpdateResponse |
update(T t,
String id)
ES更新
|
<T> org.elasticsearch.action.update.UpdateResponse |
update(T t,
String index,
String type,
String id)
数据更新
|
org.elasticsearch.action.support.master.AcknowledgedResponse |
updateIndexProperties(String index,
String type,
IndexProperties properties)
更新索引属性
|
public void setName(String name)
setName 在接口中 IESFactorypublic void setClient(org.elasticsearch.client.RestHighLevelClient client)
setClient 在接口中 IESFactorypublic ESSearchBuilder getBuilder()
IESFactorygetBuilder 在接口中 IESFactorypublic AbstractESQuery getQuery()
IESFactorygetQuery 在接口中 IESFactorypublic <T> org.elasticsearch.action.index.IndexResponse insert(T t)
throws IOException
insert 在接口中 IESFactoryt - 插入的数据IOExceptionpublic <T> org.elasticsearch.action.index.IndexResponse insert(T t,
String index,
String type)
throws IOException
IESFactoryinsert 在接口中 IESFactoryt - 新增的数据index - 新增的数据中的索引type - 新增的数据中的类型IOException - io异常public org.elasticsearch.action.index.IndexResponse insert(String data, String index, String type) throws IOException
IESFactoryinsert 在接口中 IESFactorydata - 新增的数据index - 新增的数据中的索引type - 新增的数据中的类型IOException - io异常public <T> org.elasticsearch.action.update.UpdateResponse update(T t,
String id)
throws IOException
update 在接口中 IESFactoryt - 更新的对象id - 修改的idIOException - io异常IESFactory.update(java.lang.Object, java.lang.String)public <T> org.elasticsearch.action.update.UpdateResponse update(T t,
String index,
String type,
String id)
throws IOException
IESFactoryupdate 在接口中 IESFactoryt - 更新的数据index - 更新的索引type - 更新的类型id - 更新的idIOException - io异常public org.elasticsearch.action.support.master.AcknowledgedResponse delete(String index) throws IOException
IESFactorydelete 在接口中 IESFactoryindex - 索引IOExceptionpublic org.elasticsearch.action.delete.DeleteResponse delete(String index, String type, String id) throws IOException
IESFactorydelete 在接口中 IESFactoryindex - 删除的索引type - 删除的索引类型id - 删除的idIOExceptionpublic org.elasticsearch.action.update.UpdateResponse update(String data, String index, String type, String id) throws IOException
IESFactoryupdate 在接口中 IESFactorydata - 更新的数据index - 更新的索引type - 更新的类型id - 更新的idIOException - io异常public org.elasticsearch.client.RestHighLevelClient getClient()
IESFactorygetClient 在接口中 IESFactorypublic org.elasticsearch.action.support.master.AcknowledgedResponse updateIndexProperties(String index, String type, IndexProperties properties) throws Exception
updateIndexProperties 在接口中 IESFactoryindex - 更新的索引type - 更新的索引类型properties - 更新的属性Exception - 更新异常Copyright © 2019. All rights reserved.