As usual No doc assistance when using NEST. We came across this OLD code on Stackoverflow:
> createIndexResponse = client.CreateIndex(indices[1]);
>
> // wait for index-v2 to be operable
> var clusterHealthResponse = client.ClusterHealth(c => c
> .WaitForStatus(WaitForStatus.Yellow)
> .Index(indices[1]));
>
> // swap the alias
> var bulkAliasResponse = client.Alias(ba => ba
> .Add(add => add.Alias(alias).Index(indices[1]))
> .Remove(remove => remove.Alias(alias).Index("*"))
> );
>
> // verify that the alias only exists on index-v2
> var aliasResponse = client.GetAlias(a => a.Name(alias));
But we are confused:
1- There is no ClusterHealth anymore.
2- The code that first Adds and then removes alias from All indexes - will that not remove the alias as well from the new index?
Would appreciate any assistance.