[英]Is there a way to Delete/Update existing alias in ElasticSearch using java high level client?
有没有办法使用 Java 高级休息客户端删除/更新现有别名(不是索引,只是别名)?
I do not know what version of Elasticsearch you are using but I found something like that: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-update-aliases.html我不知道您使用的是什么版本的 Elasticsearch,但我发现了类似的内容: https : //www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-update-别名.html
Example:例子:
IndicesAliasesRequest request = new IndicesAliasesRequest();
AliasActions removeAction =
new AliasActions(AliasActions.Type.REMOVE)
.index("index3")
.alias("alias3");
request.addAliasAction(removeAction);
从 ES 7.6 开始,您可以执行以下操作:
DeleteAliasRequest request = new DeleteAliasRequest("index1", "alias1");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.