Skip to content

Commit ea28362

Browse files
authored
[DOCS] Fix index boost snippet (#61023)
Updates the `indices_boost` snippet to use the `my-index-000001` index. Removes a related REST test.
1 parent 1346afd commit ea28362

File tree

2 files changed

+8
-22
lines changed

2 files changed

+8
-22
lines changed

docs/build.gradle

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -376,20 +376,6 @@ buildRestTests.doFirst {
376376
buildRestTests.setups['bank'].replace('#bank_data#', accounts)
377377
}
378378

379-
// Used by index boost doc
380-
buildRestTests.setups['index_boost'] = '''
381-
- do:
382-
indices.create:
383-
index: index1
384-
- do:
385-
indices.create:
386-
index: index2
387-
388-
- do:
389-
indices.put_alias:
390-
index: index1
391-
name: alias1
392-
'''
393379
// Used by sampler and diversified-sampler aggregation docs
394380
buildRestTests.setups['stackoverflow'] = '''
395381
- do:

docs/reference/search/request/index-boost.asciidoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ coming from one index matter more than hits coming from another index.
1010
--------------------------------------------------
1111
GET /_search
1212
{
13-
"indices_boost" : [
14-
{ "index1" : 1.4 },
15-
{ "index2" : 1.3 }
13+
"indices_boost": [
14+
{ "my-index-000001": 1.4 },
15+
{ "my-index-000002": 1.3 }
1616
]
1717
}
1818
--------------------------------------------------
19-
// TEST[setup:index_boost]
19+
// TEST[s/^/PUT my-index-000001\nPUT my-index-000002\n/]
2020

2121
Index aliases and wildcard expressions can also be used:
2222

2323
[source,console]
2424
--------------------------------------------------
2525
GET /_search
2626
{
27-
"indices_boost" : [
28-
{ "alias1" : 1.4 },
29-
{ "index*" : 1.3 }
27+
"indices_boost": [
28+
{ "my-alias": 1.4 },
29+
{ "my-index*": 1.3 }
3030
]
3131
}
3232
--------------------------------------------------
33-
// TEST[continued]
33+
// TEST[s/^/PUT my-index-000001\nPUT my-index-000001\/_alias\/my-alias\n/]
3434

3535
If multiple matches are found, the first match will be used. For example, if an
3636
index is included in both `alias1` and `index*`, boost value of `1.4` is applied.

0 commit comments

Comments
 (0)