Skip to content

Commit e1f542b

Browse files
authored
[DOCS] Use bool query in alias filter example (#73619) (#73621)
1 parent ac1ce3e commit e1f542b

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

docs/reference/alias.asciidoc

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,23 +260,33 @@ POST _aliases
260260
"actions": [
261261
{
262262
"add": {
263-
"index": "my-index-2099.05.07-000002",
263+
"index": "my-index-2099.05.06-000001",
264264
"alias": "my-alias",
265-
"is_write_index": true,
266265
"filter": {
267-
"range": {
268-
"@timestamp": {
269-
"gte": "now-1d/d",
270-
"lt": "now/d"
271-
}
266+
"bool": {
267+
"filter": [
268+
{
269+
"range": {
270+
"@timestamp": {
271+
"gte": "now-1d/d",
272+
"lt": "now/d"
273+
}
274+
}
275+
},
276+
{
277+
"term": {
278+
"user.id": "kimchy"
279+
}
280+
}
281+
]
272282
}
273283
}
274284
}
275285
}
276286
]
277287
}
278288
----
279-
// TEST[s/^/PUT my-index-2099.05.07-000002\n/]
289+
// TEST[s/^/PUT my-index-2099.05.06-000001\n/]
280290

281291
[discrete]
282292
[[alias-routing]]

0 commit comments

Comments
 (0)