简体   繁体   English

在弹性搜索中删除别名和索引

[英]Delete an alias and index in elastic search

I am working on elastic search and I have the following situation. 我正在进行弹性搜索,我有以下情况。

  1. I have two indices index1 and index2. 我有两个索引index1和index2。
  2. Alias1 points to index1 and index2. Alias1指向index1和index2。
  3. Alias2 points to index2. Alias2指向index2。

I would like to delete all of them. 我想删除所有这些。 Do I need to delete index1, index2 and then delete aliases ? 我是否需要删除index1,index2然后删除别名? Will the aliases exist if I delete both the indices ? 如果删除这两个索引,是否会存在别名? If they exist, what are the java API's to delete those aliases ? 如果它们存在,那么删除这些别名的java API是什么?

Once you have deleted your index, the alias will also get deleted. 删除索引后,别名也将被删除。

In your case, you can directly delete index1 and index2. 在您的情况下,您可以直接删除index1和index2。

Note: I've experimented it in ES 1.7 注意:我在ES 1.7中进行了实验

如果要删除别名而不是索引,请先删除别名,然后删除索引

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM