Skip to content

Commit f8def36

Browse files
Auto-generated API code
1 parent fa33037 commit f8def36

File tree

4 files changed

+50
-49
lines changed

4 files changed

+50
-49
lines changed

docs/reference.asciidoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3377,7 +3377,7 @@ client.indices.create({ index })
33773377
* *Request (object):*
33783378
** *`index` (string)*: Name of the index you wish to create.
33793379
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
3380-
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, _data_stream_timestamp })*: Mapping for fields in the index. If specified, this mapping can include:
3380+
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })*: Mapping for fields in the index. If specified, this mapping can include:
33813381
- Field names
33823382
- Field data types
33833383
- Mapping parameters
@@ -4234,7 +4234,7 @@ a new date field is added instead of string.
42344234
not used at all by Elasticsearch, but can be used to store
42354235
application-specific metadata.
42364236
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
4237-
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, dims, similarity, index, index_options } | { type } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type }>)*: Mapping for a field. For new fields, this mapping can include:
4237+
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, dims, similarity, index, index_options } | { type } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type }>)*: Mapping for a field. For new fields, this mapping can include:
42384238

42394239
- Field name
42404240
- Field data type
@@ -4309,7 +4309,7 @@ client.indices.putTemplate({ name })
43094309
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
43104310
** *`index_patterns` (Optional, string | string[])*: Array of wildcard expressions used to match the names
43114311
of indices during creation.
4312-
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, _data_stream_timestamp })*: Mapping for fields in the index.
4312+
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })*: Mapping for fields in the index.
43134313
** *`order` (Optional, number)*: Order in which Elasticsearch applies this template if index
43144314
matches multiple templates.
43154315

@@ -4462,7 +4462,7 @@ If specified, Elasticsearch only performs the rollover if the current index sati
44624462
If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
44634463
If conditions are specified, at least one of them must be a `max_*` condition.
44644464
The index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.
4465-
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, _data_stream_timestamp })*: Mapping for fields in the index.
4465+
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })*: Mapping for fields in the index.
44664466
If specified, this mapping can include field names, field data types, and mapping paramaters.
44674467
** *`settings` (Optional, Record<string, User-defined value>)*: Configuration options for the index.
44684468
Data streams do not support this parameter.
@@ -6436,6 +6436,7 @@ so one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,
64366436
or `windows-x86_64`. For portable models (those that work independent of processor
64376437
architecture or OS features), leave this field unset.
64386438
** *`tags` (Optional, string[])*: An array of tags to organize the model.
6439+
** *`prefix_strings` (Optional, { ingest, search })*: Optional prefix strings applied at inference
64396440
** *`defer_definition_decompression` (Optional, boolean)*: If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations.
64406441

64416442
[discrete]

src/api/api/ml.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ export default class Ml {
18211821
async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise<T.MlPutTrainedModelResponse>
18221822
async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise<any> {
18231823
const acceptedPath: string[] = ['model_id']
1824-
const acceptedBody: string[] = ['compressed_definition', 'definition', 'description', 'inference_config', 'input', 'metadata', 'model_type', 'model_size_bytes', 'platform_architecture', 'tags']
1824+
const acceptedBody: string[] = ['compressed_definition', 'definition', 'description', 'inference_config', 'input', 'metadata', 'model_type', 'model_size_bytes', 'platform_architecture', 'tags', 'prefix_strings']
18251825
const querystring: Record<string, any> = {}
18261826
// @ts-expect-error
18271827
const userBody: any = params?.body

src/api/types.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5095,6 +5095,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase
50955095

50965096
export interface MappingObjectProperty extends MappingCorePropertyBase {
50975097
enabled?: boolean
5098+
subobjects?: boolean
50985099
type?: 'object'
50995100
}
51005101

@@ -5269,6 +5270,7 @@ export interface MappingTypeMapping {
52695270
_source?: MappingSourceField
52705271
runtime?: Record<string, MappingRuntimeField>
52715272
enabled?: boolean
5273+
subobjects?: boolean
52725274
_data_stream_timestamp?: MappingDataStreamTimestamp
52735275
}
52745276

@@ -9747,7 +9749,7 @@ export interface IndicesIndexSettingsKeys {
97479749
settings?: IndicesIndexSettings
97489750
time_series?: IndicesIndexSettingsTimeSeries
97499751
queries?: IndicesQueries
9750-
similarity?: IndicesSettingsSimilarity
9752+
similarity?: Record<string, IndicesSettingsSimilarity>
97519753
mapping?: IndicesMappingLimitSettings
97529754
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
97539755
indexing_pressure?: IndicesIndexingPressure
@@ -9925,55 +9927,52 @@ export interface IndicesSettingsSearch {
99259927
slowlog?: IndicesSlowlogSettings
99269928
}
99279929

9928-
export interface IndicesSettingsSimilarity {
9929-
bm25?: IndicesSettingsSimilarityBm25
9930-
dfi?: IndicesSettingsSimilarityDfi
9931-
dfr?: IndicesSettingsSimilarityDfr
9932-
ib?: IndicesSettingsSimilarityIb
9933-
lmd?: IndicesSettingsSimilarityLmd
9934-
lmj?: IndicesSettingsSimilarityLmj
9935-
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
9936-
}
9930+
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted
99379931

99389932
export interface IndicesSettingsSimilarityBm25 {
9939-
b: double
9940-
discount_overlaps: boolean
9941-
k1: double
99429933
type: 'BM25'
9934+
b?: double
9935+
discount_overlaps?: boolean
9936+
k1?: double
9937+
}
9938+
9939+
export interface IndicesSettingsSimilarityBoolean {
9940+
type: 'boolean'
99439941
}
99449942

99459943
export interface IndicesSettingsSimilarityDfi {
9946-
independence_measure: DFIIndependenceMeasure
99479944
type: 'DFI'
9945+
independence_measure: DFIIndependenceMeasure
99489946
}
99499947

99509948
export interface IndicesSettingsSimilarityDfr {
9949+
type: 'DFR'
99519950
after_effect: DFRAfterEffect
99529951
basic_model: DFRBasicModel
99539952
normalization: Normalization
9954-
type: 'DFR'
99559953
}
99569954

99579955
export interface IndicesSettingsSimilarityIb {
9956+
type: 'IB'
99589957
distribution: IBDistribution
99599958
lambda: IBLambda
99609959
normalization: Normalization
9961-
type: 'IB'
99629960
}
99639961

99649962
export interface IndicesSettingsSimilarityLmd {
9965-
mu: integer
99669963
type: 'LMDirichlet'
9964+
mu?: double
99679965
}
99689966

99699967
export interface IndicesSettingsSimilarityLmj {
9970-
lambda: double
99719968
type: 'LMJelinekMercer'
9969+
lambda?: double
99729970
}
99739971

9974-
export interface IndicesSettingsSimilarityScriptedTfidf {
9975-
script: Script
9972+
export interface IndicesSettingsSimilarityScripted {
99769973
type: 'scripted'
9974+
script: Script
9975+
weight_script?: Script
99779976
}
99789977

99799978
export interface IndicesSlowlogSettings {
@@ -13216,8 +13215,8 @@ export interface MlTrainedModelLocationIndex {
1321613215
}
1321713216

1321813217
export interface MlTrainedModelPrefixStrings {
13219-
ingest: string
13220-
search: string
13218+
ingest?: string
13219+
search?: string
1322113220
}
1322213221

1322313222
export interface MlTrainedModelSizeStats {
@@ -14154,6 +14153,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
1415414153
model_size_bytes?: long
1415514154
platform_architecture?: string
1415614155
tags?: string[]
14156+
prefix_strings?: MlTrainedModelPrefixStrings
1415714157
}
1415814158

1415914159
export type MlPutTrainedModelResponse = MlTrainedModelConfig

src/api/typesWithBodyKey.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5168,6 +5168,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase
51685168

51695169
export interface MappingObjectProperty extends MappingCorePropertyBase {
51705170
enabled?: boolean
5171+
subobjects?: boolean
51715172
type?: 'object'
51725173
}
51735174

@@ -5342,6 +5343,7 @@ export interface MappingTypeMapping {
53425343
_source?: MappingSourceField
53435344
runtime?: Record<string, MappingRuntimeField>
53445345
enabled?: boolean
5346+
subobjects?: boolean
53455347
_data_stream_timestamp?: MappingDataStreamTimestamp
53465348
}
53475349

@@ -9873,7 +9875,7 @@ export interface IndicesIndexSettingsKeys {
98739875
settings?: IndicesIndexSettings
98749876
time_series?: IndicesIndexSettingsTimeSeries
98759877
queries?: IndicesQueries
9876-
similarity?: IndicesSettingsSimilarity
9878+
similarity?: Record<string, IndicesSettingsSimilarity>
98779879
mapping?: IndicesMappingLimitSettings
98789880
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
98799881
indexing_pressure?: IndicesIndexingPressure
@@ -10051,55 +10053,52 @@ export interface IndicesSettingsSearch {
1005110053
slowlog?: IndicesSlowlogSettings
1005210054
}
1005310055

10054-
export interface IndicesSettingsSimilarity {
10055-
bm25?: IndicesSettingsSimilarityBm25
10056-
dfi?: IndicesSettingsSimilarityDfi
10057-
dfr?: IndicesSettingsSimilarityDfr
10058-
ib?: IndicesSettingsSimilarityIb
10059-
lmd?: IndicesSettingsSimilarityLmd
10060-
lmj?: IndicesSettingsSimilarityLmj
10061-
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
10062-
}
10056+
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted
1006310057

1006410058
export interface IndicesSettingsSimilarityBm25 {
10065-
b: double
10066-
discount_overlaps: boolean
10067-
k1: double
1006810059
type: 'BM25'
10060+
b?: double
10061+
discount_overlaps?: boolean
10062+
k1?: double
10063+
}
10064+
10065+
export interface IndicesSettingsSimilarityBoolean {
10066+
type: 'boolean'
1006910067
}
1007010068

1007110069
export interface IndicesSettingsSimilarityDfi {
10072-
independence_measure: DFIIndependenceMeasure
1007310070
type: 'DFI'
10071+
independence_measure: DFIIndependenceMeasure
1007410072
}
1007510073

1007610074
export interface IndicesSettingsSimilarityDfr {
10075+
type: 'DFR'
1007710076
after_effect: DFRAfterEffect
1007810077
basic_model: DFRBasicModel
1007910078
normalization: Normalization
10080-
type: 'DFR'
1008110079
}
1008210080

1008310081
export interface IndicesSettingsSimilarityIb {
10082+
type: 'IB'
1008410083
distribution: IBDistribution
1008510084
lambda: IBLambda
1008610085
normalization: Normalization
10087-
type: 'IB'
1008810086
}
1008910087

1009010088
export interface IndicesSettingsSimilarityLmd {
10091-
mu: integer
1009210089
type: 'LMDirichlet'
10090+
mu?: double
1009310091
}
1009410092

1009510093
export interface IndicesSettingsSimilarityLmj {
10096-
lambda: double
1009710094
type: 'LMJelinekMercer'
10095+
lambda?: double
1009810096
}
1009910097

10100-
export interface IndicesSettingsSimilarityScriptedTfidf {
10101-
script: Script
10098+
export interface IndicesSettingsSimilarityScripted {
1010210099
type: 'scripted'
10100+
script: Script
10101+
weight_script?: Script
1010310102
}
1010410103

1010510104
export interface IndicesSlowlogSettings {
@@ -13404,8 +13403,8 @@ export interface MlTrainedModelLocationIndex {
1340413403
}
1340513404

1340613405
export interface MlTrainedModelPrefixStrings {
13407-
ingest: string
13408-
search: string
13406+
ingest?: string
13407+
search?: string
1340913408
}
1341013409

1341113410
export interface MlTrainedModelSizeStats {
@@ -14417,6 +14416,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
1441714416
model_size_bytes?: long
1441814417
platform_architecture?: string
1441914418
tags?: string[]
14419+
prefix_strings?: MlTrainedModelPrefixStrings
1442014420
}
1442114421
}
1442214422

0 commit comments

Comments
 (0)