Anirudh Kashyap
Anirudh Kashyap

Reputation: 317

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.
  2. Alias1 points to index1 and index2.
  3. Alias2 points to index2.

I would like to delete all of them. Do I need to delete index1, index2 and then delete aliases ? Will the aliases exist if I delete both the indices ? If they exist, what are the java API's to delete those aliases ?

Upvotes: 4

Views: 2849

Answers (2)

Amar Srivastava
Amar Srivastava

Reputation: 373

If you want to delete your Alias not index then first delete the Alias and then Index

Upvotes: 0

Pandiyan Cool
Pandiyan Cool

Reputation: 6565

Once you have deleted your index, the alias will also get deleted.

In your case, you can directly delete index1 and index2.

Note: I've experimented it in ES 1.7

Upvotes: 7

Related Questions