index-management icon indicating copy to clipboard operation
index-management copied to clipboard

Alias Action

Open dbbaughe opened this issue 4 years ago • 6 comments

During the community meeting, someone asked if it was possible to have an action to add an alias to the index. Will use this issue to track it + see if other people are interested.

dbbaughe avatar Feb 11 '20 19:02 dbbaughe

Hey @jasonrojas, @teddyphreak, and @dparker18

Do you have some examples of what you would be using this for? And any specific optional settings for the alias operation?

dbbaughe avatar Aug 11 '20 04:08 dbbaughe

One use case we have is for indices older than a certain age, we allocate them to a cold node, shrink them, delete the original and create an alias with the original name that points to the shrink index. This keeps our shard count down while not breaking queries for older data.

samling avatar Aug 11 '20 05:08 samling

My use case is when an index foo is shrunk, it becomes shrink-foo. An alias action would allow the new shrunk index to also be aliased to foo so applications don't know the difference. When we moved from x-pack and ILM to ISM, the aliasing had to be handled with custom code outside ES. I'd be just as happy with the alias being an optional setting on the shrink operation. Happy to share details, but what we're doing is pretty basic.

dparker18 avatar Aug 11 '20 05:08 dparker18

my use case is around the shrinking of indices as well. But in general I think it would be great to support adding an alias, especially if we get to the stage where we can roll up indices into single indices then alias them with the ones that were rolled up.

jasonrojas avatar Aug 11 '20 14:08 jasonrojas

My use case is, If we have an alias for an index with rollover ILM policy, can we remove it from alias after some predefined days, let's say 30 days? I know there is a way to delete an index once its old, but in our case we do not want to delete but want the index to be removed from alias and have the alias switch and point to indices whose age is less than 30 days.

tharsha18 avatar Sep 11 '20 19:09 tharsha18

My use case is:

we provide search_alias to search our dataset. We publish new version of dataset every week as a new index (e.g. dataset-yyyy-MM-dd. We want the search_alias always pointing to the latest published dataset. The process is: ingest new data to a new index once ingestion finish, re-pointing search_alias to the new index, remove old index from the search_alias

CharlesZ-Chen avatar Dec 17 '20 19:12 CharlesZ-Chen