* [docs] update readme and examples to use async/await * [apis] regenerate (including updated examples)
13 lines
328 B
Plaintext
13 lines
328 B
Plaintext
.Perform an atomic alias swap, for a rotating index
|
|
[source,js]
|
|
---------
|
|
const response = await client.indices.updateAliases({
|
|
body: {
|
|
actions: [
|
|
{ remove: { index: 'logstash-2014.04', alias: 'logstash-current' } },
|
|
{ add: { index: 'logstash-2014.05', alias: 'logstash-current' } }
|
|
]
|
|
}
|
|
});
|
|
---------
|