File tree Expand file tree Collapse file tree 2 files changed +9
-23
lines changed Expand file tree Collapse file tree 2 files changed +9
-23
lines changed Original file line number Diff line number Diff line change @@ -372,20 +372,6 @@ buildRestTests.doFirst {
372372 buildRestTests. setups[' bank' ]. replace(' #bank_data#' , accounts)
373373}
374374
375- // Used by index boost doc
376- buildRestTests. setups[' index_boost' ] = '''
377- - do:
378- indices.create:
379- index: index1
380- - do:
381- indices.create:
382- index: index2
383-
384- - do:
385- indices.put_alias:
386- index: index1
387- name: alias1
388- '''
389375// Used by sampler and diversified-sampler aggregation docs
390376buildRestTests. setups[' stackoverflow' ] = '''
391377 - do:
Original file line number Diff line number Diff line change @@ -10,27 +10,27 @@ coming from one index matter more than hits coming from another index.
1010--------------------------------------------------
1111GET /_search
1212{
13- "indices_boost" : {
14- "index1" : 1.4,
15- "index2" : 1.3
16- }
13+ "indices_boost": [
14+ { "my-index-000001" : 1.4 } ,
15+ { "my-index-000002" : 1.3 }
16+ ]
1717}
1818--------------------------------------------------
19- // TEST[setup:index_boost warning:Object format in indices_boost is deprecated, please use array format instead ]
19+ // TEST[s/^/PUT my-index-000001\nPUT my-index-000002\n/ ]
2020
2121You can also specify it as an array to control the order of boosts.
2222
2323[source,console]
2424--------------------------------------------------
2525GET /_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
3535This is important when you use aliases or wildcard expression.
3636If multiple matches are found, the first match will be used.
You can’t perform that action at this time.
0 commit comments