37 lines
765 B
Plaintext
37 lines
765 B
Plaintext
// This file is autogenerated, DO NOT EDIT
|
|
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
|
|
|
[source, js]
|
|
----
|
|
const response = await client.indices.updateAliases({
|
|
actions: [
|
|
{
|
|
add: {
|
|
index: "my-index-2099.05.06-000001",
|
|
alias: "my-alias",
|
|
filter: {
|
|
bool: {
|
|
filter: [
|
|
{
|
|
range: {
|
|
"@timestamp": {
|
|
gte: "now-1d/d",
|
|
lt: "now/d",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
term: {
|
|
"user.id": "kimchy",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|
|
console.log(response);
|
|
----
|