Skip to content

Commit c68ddbd

Browse files
Auto-generated code for 8.10 (#2072)
1 parent 538efe0 commit c68ddbd

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

docs/reference.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ If `false`, the response does not include the total number of hits matching the
826826
** *`indices_boost` (Optional, Record<string, number>[])*: Boosts the _score of documents from specified indices.
827827
** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (`*`) patterns.
828828
The request returns doc values for field names matching these patterns in the `hits.fields` property of the response.
829-
** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter }[])*: Defines the approximate kNN search to run.
829+
** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity }[])*: Defines the approximate kNN search to run.
830830
** *`rank` (Optional, { rrf })*: Defines the Reciprocal Rank Fusion (RRF) to use.
831831
** *`min_score` (Optional, number)*: Minimum `_score` for matching documents.
832832
Documents with a lower `_score` are not included in the search results.
@@ -1305,7 +1305,7 @@ Defaults to 10,000 hits.
13051305
** *`indices_boost` (Optional, Record<string, number>[])*: Boosts the _score of documents from specified indices.
13061306
** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns doc values for field
13071307
names matching these patterns in the hits.fields property of the response.
1308-
** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter }[])*: Defines the approximate kNN search to run.
1308+
** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity }[])*: Defines the approximate kNN search to run.
13091309
** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are
13101310
not included in the search results.
13111311
** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*
@@ -6234,6 +6234,7 @@ client.ml.putTrainedModelVocabulary({ model_id, vocabulary })
62346234
** *`model_id` (string)*: The unique identifier of the trained model.
62356235
** *`vocabulary` (string[])*: The model vocabulary, which must not be empty.
62366236
** *`merges` (Optional, string[])*: The optional model merges if required by the tokenizer.
6237+
** *`scores` (Optional, number[])*: The optional vocabulary value scores if required by the tokenizer.
62376238

62386239
[discrete]
62396240
==== reset_job
@@ -8917,6 +8918,8 @@ client.transform.deleteTransform({ transform_id })
89178918
** *`transform_id` (string)*: Identifier for the transform.
89188919
** *`force` (Optional, boolean)*: If this value is false, the transform must be stopped before it can be deleted. If true, the transform is
89198920
deleted regardless of its current state.
8921+
** *`delete_dest_index` (Optional, boolean)*: If this value is true, the destination index is deleted together with the transform. If false, the destination
8922+
index will not be deleted
89208923
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
89218924

89228925
[discrete]

src/api/api/ml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,7 @@ export default class Ml {
19231923
async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptions): Promise<T.MlPutTrainedModelVocabularyResponse>
19241924
async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptions): Promise<any> {
19251925
const acceptedPath: string[] = ['model_id']
1926-
const acceptedBody: string[] = ['vocabulary', 'merges']
1926+
const acceptedBody: string[] = ['vocabulary', 'merges', 'scores']
19271927
const querystring: Record<string, any> = {}
19281928
// @ts-expect-error
19291929
const userBody: any = params?.body

src/api/types.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ export interface MsearchMultiSearchItem<TDocument = unknown> extends SearchRespo
707707
status?: integer
708708
}
709709

710-
export interface MsearchMultiSearchResult<TDocument = unknown> {
710+
export interface MsearchMultiSearchResult<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> {
711711
took: long
712712
responses: MsearchResponseItem<TDocument>[]
713713
}
@@ -780,7 +780,7 @@ export interface MsearchRequest extends RequestBase {
780780

781781
export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody
782782

783-
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>
783+
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
784784

785785
export type MsearchResponseItem<TDocument = unknown> = MsearchMultiSearchItem<TDocument> | ErrorResponseBase
786786

@@ -796,7 +796,7 @@ export interface MsearchTemplateRequest extends RequestBase {
796796

797797
export type MsearchTemplateRequestItem = MsearchMultisearchHeader | MsearchTemplateTemplateConfig
798798

799-
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>
799+
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
800800

801801
export interface MsearchTemplateTemplateConfig {
802802
explain?: boolean
@@ -1146,7 +1146,6 @@ export interface SearchRequest extends RequestBase {
11461146
_source_includes?: Fields
11471147
q?: string
11481148
aggregations?: Record<string, AggregationsAggregationContainer>
1149-
/** @alias aggregations */
11501149
aggs?: Record<string, AggregationsAggregationContainer>
11511150
collapse?: SearchFieldCollapse
11521151
explain?: boolean
@@ -2272,6 +2271,7 @@ export interface KnnQuery {
22722271
num_candidates: long
22732272
boost?: float
22742273
filter?: QueryDslQueryContainer | QueryDslQueryContainer[]
2274+
similarity?: float
22752275
}
22762276

22772277
export interface LatLonGeoLocation {
@@ -6114,7 +6114,6 @@ export interface AsyncSearchSubmitRequest extends RequestBase {
61146114
_source_includes?: Fields
61156115
q?: string
61166116
aggregations?: Record<string, AggregationsAggregationContainer>
6117-
/** @alias aggregations */
61186117
aggs?: Record<string, AggregationsAggregationContainer>
61196118
collapse?: SearchFieldCollapse
61206119
explain?: boolean
@@ -9196,7 +9195,6 @@ export interface FleetSearchRequest extends RequestBase {
91969195
wait_for_checkpoints?: FleetCheckpoint[]
91979196
allow_partial_search_results?: boolean
91989197
aggregations?: Record<string, AggregationsAggregationContainer>
9199-
/** @alias aggregations */
92009198
aggs?: Record<string, AggregationsAggregationContainer>
92019199
collapse?: SearchFieldCollapse
92029200
explain?: boolean
@@ -13831,7 +13829,6 @@ export interface MlPutDatafeedRequest extends RequestBase {
1383113829
delayed_data_check_config?: MlDelayedDataCheckConfig
1383213830
frequency?: Duration
1383313831
indices?: Indices
13834-
/** @alias indices */
1383513832
indexes?: Indices
1383613833
indices_options?: IndicesOptions
1383713834
job_id?: Id
@@ -14031,6 +14028,7 @@ export interface MlPutTrainedModelVocabularyRequest extends RequestBase {
1403114028
model_id: Id
1403214029
vocabulary: string[]
1403314030
merges?: string[]
14031+
scores?: double[]
1403414032
}
1403514033

1403614034
export type MlPutTrainedModelVocabularyResponse = AcknowledgedResponseBase
@@ -14163,7 +14161,6 @@ export interface MlUpdateDatafeedRequest extends RequestBase {
1416314161
delayed_data_check_config?: MlDelayedDataCheckConfig
1416414162
frequency?: Duration
1416514163
indices?: string[]
14166-
/** @alias indices */
1416714164
indexes?: string[]
1416814165
indices_options?: IndicesOptions
1416914166
job_id?: Id
@@ -15433,7 +15430,6 @@ export interface RollupRollupSearchRequest extends RequestBase {
1543315430
rest_total_hits_as_int?: boolean
1543415431
typed_keys?: boolean
1543515432
aggregations?: Record<string, AggregationsAggregationContainer>
15436-
/** @alias aggregations */
1543715433
aggs?: Record<string, AggregationsAggregationContainer>
1543815434
query?: QueryDslQueryContainer
1543915435
size?: integer
@@ -17361,6 +17357,7 @@ export interface TransformTimeSync {
1736117357
export interface TransformDeleteTransformRequest extends RequestBase {
1736217358
transform_id: Id
1736317359
force?: boolean
17360+
delete_dest_index?: boolean
1736417361
timeout?: Duration
1736517362
}
1736617363

src/api/typesWithBodyKey.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ export interface MsearchMultiSearchItem<TDocument = unknown> extends SearchRespo
735735
status?: integer
736736
}
737737

738-
export interface MsearchMultiSearchResult<TDocument = unknown> {
738+
export interface MsearchMultiSearchResult<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> {
739739
took: long
740740
responses: MsearchResponseItem<TDocument>[]
741741
}
@@ -809,7 +809,7 @@ export interface MsearchRequest extends RequestBase {
809809

810810
export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody
811811

812-
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>
812+
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
813813

814814
export type MsearchResponseItem<TDocument = unknown> = MsearchMultiSearchItem<TDocument> | ErrorResponseBase
815815

@@ -826,7 +826,7 @@ export interface MsearchTemplateRequest extends RequestBase {
826826

827827
export type MsearchTemplateRequestItem = MsearchMultisearchHeader | MsearchTemplateTemplateConfig
828828

829-
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>
829+
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
830830

831831
export interface MsearchTemplateTemplateConfig {
832832
explain?: boolean
@@ -1200,7 +1200,6 @@ export interface SearchRequest extends RequestBase {
12001200
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
12011201
body?: {
12021202
aggregations?: Record<string, AggregationsAggregationContainer>
1203-
/** @alias aggregations */
12041203
aggs?: Record<string, AggregationsAggregationContainer>
12051204
collapse?: SearchFieldCollapse
12061205
explain?: boolean
@@ -2345,6 +2344,7 @@ export interface KnnQuery {
23452344
num_candidates: long
23462345
boost?: float
23472346
filter?: QueryDslQueryContainer | QueryDslQueryContainer[]
2347+
similarity?: float
23482348
}
23492349

23502350
export interface LatLonGeoLocation {
@@ -6189,7 +6189,6 @@ export interface AsyncSearchSubmitRequest extends RequestBase {
61896189
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
61906190
body?: {
61916191
aggregations?: Record<string, AggregationsAggregationContainer>
6192-
/** @alias aggregations */
61936192
aggs?: Record<string, AggregationsAggregationContainer>
61946193
collapse?: SearchFieldCollapse
61956194
explain?: boolean
@@ -9306,7 +9305,6 @@ export interface FleetSearchRequest extends RequestBase {
93069305
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
93079306
body?: {
93089307
aggregations?: Record<string, AggregationsAggregationContainer>
9309-
/** @alias aggregations */
93109308
aggs?: Record<string, AggregationsAggregationContainer>
93119309
collapse?: SearchFieldCollapse
93129310
explain?: boolean
@@ -14078,7 +14076,6 @@ export interface MlPutDatafeedRequest extends RequestBase {
1407814076
delayed_data_check_config?: MlDelayedDataCheckConfig
1407914077
frequency?: Duration
1408014078
indices?: Indices
14081-
/** @alias indices */
1408214079
indexes?: Indices
1408314080
indices_options?: IndicesOptions
1408414081
job_id?: Id
@@ -14293,6 +14290,7 @@ export interface MlPutTrainedModelVocabularyRequest extends RequestBase {
1429314290
body?: {
1429414291
vocabulary: string[]
1429514292
merges?: string[]
14293+
scores?: double[]
1429614294
}
1429714295
}
1429814296

@@ -14440,7 +14438,6 @@ export interface MlUpdateDatafeedRequest extends RequestBase {
1444014438
delayed_data_check_config?: MlDelayedDataCheckConfig
1444114439
frequency?: Duration
1444214440
indices?: string[]
14443-
/** @alias indices */
1444414441
indexes?: string[]
1444514442
indices_options?: IndicesOptions
1444614443
job_id?: Id
@@ -15736,7 +15733,6 @@ export interface RollupRollupSearchRequest extends RequestBase {
1573615733
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
1573715734
body?: {
1573815735
aggregations?: Record<string, AggregationsAggregationContainer>
15739-
/** @alias aggregations */
1574015736
aggs?: Record<string, AggregationsAggregationContainer>
1574115737
query?: QueryDslQueryContainer
1574215738
size?: integer
@@ -17771,6 +17767,7 @@ export interface TransformTimeSync {
1777117767
export interface TransformDeleteTransformRequest extends RequestBase {
1777217768
transform_id: Id
1777317769
force?: boolean
17770+
delete_dest_index?: boolean
1777417771
timeout?: Duration
1777517772
}
1777617773

0 commit comments

Comments
 (0)