Skip to content

Commit 40c19f3

Browse files
Fix indices_boost type (#4147) (#4150)
(cherry picked from commit 254f15e) Co-authored-by: Florian Bernd <git@flobernd.de>
1 parent 7bd036b commit 40c19f3

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

specification/_global/msearch/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { PointInTimeReference } from '@global/search/_types/PointInTimeReference
2525
import { Rescore } from '@global/search/_types/rescoring'
2626
import { SourceConfig } from '@global/search/_types/SourceFilter'
2727
import { Suggester } from '@global/search/_types/suggester'
28-
import { Dictionary } from '@spec_utils/Dictionary'
28+
import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary'
2929
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
3030
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
3131
import { ErrorResponseBase } from '@_types/Base'
@@ -116,7 +116,7 @@ export class MultisearchBody {
116116
/**
117117
* Boosts the _score of documents from specified indices.
118118
*/
119-
indices_boost?: Array<Dictionary<IndexName, double>>
119+
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
120120
/**
121121
* Minimum _score for matching documents. Documents with a lower _score are
122122
* not included in the search results.

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { TrackHits } from '@global/search/_types/hits'
21-
import { Dictionary } from '@spec_utils/Dictionary'
21+
import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary'
2222
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2323
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
2424
import { RequestBase } from '@_types/Base'
@@ -427,7 +427,7 @@ export interface Request extends RequestBase {
427427
* A boost value between `0` and `1.0` decreases the score.
428428
* @ext_doc_id relevance-scores
429429
*/
430-
indices_boost?: Array<Dictionary<IndexName, double>>
430+
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
431431
/**
432432
* An array of wildcard (`*`) field patterns.
433433
* The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.

specification/async_search/submit/AsyncSearchSubmitRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
SourceConfigParam
2828
} from '@global/search/_types/SourceFilter'
2929
import { Suggester } from '@global/search/_types/suggester'
30-
import { Dictionary } from '@spec_utils/Dictionary'
30+
import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary'
3131
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
3232
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
3333
import { RequestBase } from '@_types/Base'
@@ -189,7 +189,7 @@ export interface Request extends RequestBase {
189189
/**
190190
* Boosts the _score of documents from specified indices.
191191
*/
192-
indices_boost?: Array<Dictionary<IndexName, double>>
192+
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
193193
/**
194194
* Array of wildcard (*) patterns. The request returns doc values for field
195195
* names matching these patterns in the hits.fields property of the response.

specification/fleet/search/SearchRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
SourceConfigParam
2828
} from '@global/search/_types/SourceFilter'
2929
import { Suggester } from '@global/search/_types/suggester'
30-
import { Dictionary } from '@spec_utils/Dictionary'
30+
import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary'
3131
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
3232
import { AggregationContainer } from '@_types/aggregations/AggregationContainer'
3333
import { RequestBase } from '@_types/Base'
@@ -167,7 +167,7 @@ export interface Request extends RequestBase {
167167
/**
168168
* Boosts the _score of documents from specified indices.
169169
*/
170-
indices_boost?: Array<Dictionary<IndexName, double>>
170+
indices_boost?: Array<SingleKeyDictionary<IndexName, double>>
171171
/**
172172
* Array of wildcard (*) patterns. The request returns doc values for field
173173
* names matching these patterns in the hits.fields property of the response.

0 commit comments

Comments
 (0)