| endpoint | indices.delete_alias |
|---|---|
| lang | go |
| es_version | 9.3 |
| client | github.com/elastic/go-elasticsearch/v9 |
Use client.Indices.DeleteAlias() to remove an alias from an
index:
_, err := client.Indices.DeleteAlias("products", "shop").
Do(context.Background())
if err != nil {
log.Fatalf("Error: %s", err)
}Remove several aliases at once by passing multiple names:
_, err := client.Indices.DeleteAlias("products", "shop,electronics").
Do(context.Background())
if err != nil {
log.Fatalf("Error: %s", err)
}