public class EsContext extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
EsCommand |
lastCommand
已过时。
|
| 构造器和说明 |
|---|
EsContext(Properties prop) |
EsContext(String url) |
EsContext(String url,
String username,
String paasword) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
componentCreate(String componentName,
String dsl)
模板创建
|
boolean |
componentExist(String componentName)
模板是否创建
|
String |
componentShow(String componentName)
模板结构创建
|
String |
execAsBody(EsCommand cmd)
执行并返回结果体
|
int |
execAsCode(EsCommand cmd)
执行并返回状态码
|
protected org.noear.esearchx.PriHttpUtils |
getHttp(String path) |
String |
getMeta()
获取元信息
|
int |
getVersion()
获取版本号
|
EsQuery |
indice(String indiceName)
获取索引操作
|
String |
indiceAliases(Consumer<EsAliases> aliases)
索引别名处理
|
String |
indiceCreate(String indiceName,
String dsl)
索引创建
|
boolean |
indiceDrop(String indiceName)
索引删除
|
boolean |
indiceExist(String indiceName)
索引是否存在
|
String |
indiceSettings(String indiceName,
Consumer<EsSetting> setting)
索引设置修改
|
String |
indiceShow(String indiceName)
索引结构显示
|
String |
policyCreate(String policyName,
String dsl)
索引生命周期策略创建
|
boolean |
policyExist(String policyName)
索引生命周期策略是否存在?
|
String |
policyShow(String policyName)
索引生命结构显示
|
EsQuery |
stream(String streamName) |
String |
templateCreate(String templateName,
String dsl)
模板创建
|
boolean |
templateExist(String templateName)
模板是否创建
|
String |
templateShow(String templateName)
模板结构显示
|
@Deprecated public EsCommand lastCommand
public EsContext(Properties prop)
public EsContext(String url)
public String getMeta()
public int getVersion()
protected org.noear.esearchx.PriHttpUtils getHttp(String path)
public String execAsBody(EsCommand cmd) throws IOException
cmd - 命令IOExceptionpublic int execAsCode(EsCommand cmd) throws IOException
cmd - 命令IOExceptionpublic String indiceCreate(String indiceName, String dsl) throws IOException
indiceName - 索引名字IOExceptionpublic boolean indiceExist(String indiceName) throws IOException
indiceName - 索引名字IOExceptionpublic boolean indiceDrop(String indiceName) throws IOException
indiceName - 索引名字IOExceptionpublic String indiceSettings(String indiceName, Consumer<EsSetting> setting) throws IOException
indiceName - 索引名字IOExceptionpublic String indiceShow(String indiceName) throws IOException
indiceName - 索引名字IOExceptionpublic String indiceAliases(Consumer<EsAliases> aliases) throws IOException
IOExceptionpublic String templateCreate(String templateName, String dsl) throws IOException
IOExceptionpublic boolean templateExist(String templateName) throws IOException
templateName - 模板名称IOExceptionpublic String templateShow(String templateName) throws IOException
templateName - 模板名称IOExceptionpublic String componentCreate(String componentName, String dsl) throws IOException
IOExceptionpublic boolean componentExist(String componentName) throws IOException
componentName - 模板名称IOExceptionpublic String componentShow(String componentName) throws IOException
componentName - 模板名称IOExceptionpublic String policyCreate(String policyName, String dsl) throws IOException
policyName - 策略名称IOExceptionpublic boolean policyExist(String policyName) throws IOException
policyName - 策略名称IOExceptionpublic String policyShow(String policyName) throws IOException
policyName - 策略名称IOExceptionCopyright © 2022. All rights reserved.