Skip to content

Commit 6974924

Browse files
Auto-generated API code
1 parent a1b3412 commit 6974924

File tree

3 files changed

+46
-48
lines changed

3 files changed

+46
-48
lines changed

docs/reference.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ client.indices.create({ index })
19521952
* *Request (object):*
19531953
** *`index` (string)*: Name of the index you wish to create.
19541954
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
1955-
** *`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 })*: Mapping for fields in the index. If specified, this mapping can include:
1955+
** *`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 })*: Mapping for fields in the index. If specified, this mapping can include:
19561956
- Field names
19571957
- Field data types
19581958
- Mapping parameters
@@ -2540,7 +2540,7 @@ a new date field is added instead of string.
25402540
not used at all by Elasticsearch, but can be used to store
25412541
application-specific metadata.
25422542
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
2543-
** *`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, 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 } | { 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, 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:
2543+
** *`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, 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 } | { 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, 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:
25442544

25452545
- Field name
25462546
- Field data type
@@ -2615,7 +2615,7 @@ client.indices.putTemplate({ name })
26152615
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
26162616
** *`index_patterns` (Optional, string | string[])*: Array of wildcard expressions used to match the names
26172617
of indices during creation.
2618-
** *`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 })*: Mapping for fields in the index.
2618+
** *`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 })*: Mapping for fields in the index.
26192619
** *`order` (Optional, number)*: Order in which Elasticsearch applies this template if index
26202620
matches multiple templates.
26212621

@@ -2703,7 +2703,7 @@ If specified, Elasticsearch only performs the rollover if the current index sati
27032703
If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
27042704
If conditions are specified, at least one of them must be a `max_*` condition.
27052705
The index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.
2706-
** *`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 })*: Mapping for fields in the index.
2706+
** *`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 })*: Mapping for fields in the index.
27072707
If specified, this mapping can include field names, field data types, and mapping paramaters.
27082708
** *`settings` (Optional, Record<string, User-defined value>)*: Configuration options for the index.
27092709
Data streams do not support this parameter.

src/api/types.ts

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

50755075
export interface MappingObjectProperty extends MappingCorePropertyBase {
50765076
enabled?: boolean
5077+
subobjects?: boolean
50775078
type?: 'object'
50785079
}
50795080

@@ -5248,6 +5249,7 @@ export interface MappingTypeMapping {
52485249
_source?: MappingSourceField
52495250
runtime?: Record<string, MappingRuntimeField>
52505251
enabled?: boolean
5252+
subobjects?: boolean
52515253
}
52525254

52535255
export interface MappingUnsignedLongNumberProperty extends MappingNumberPropertyBase {
@@ -9700,7 +9702,7 @@ export interface IndicesIndexSettingsKeys {
97009702
settings?: IndicesIndexSettings
97019703
time_series?: IndicesIndexSettingsTimeSeries
97029704
queries?: IndicesQueries
9703-
similarity?: IndicesSettingsSimilarity
9705+
similarity?: Record<string, IndicesSettingsSimilarity>
97049706
mapping?: IndicesMappingLimitSettings
97059707
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
97069708
indexing_pressure?: IndicesIndexingPressure
@@ -9876,55 +9878,52 @@ export interface IndicesSettingsSearch {
98769878
slowlog?: IndicesSlowlogSettings
98779879
}
98789880

9879-
export interface IndicesSettingsSimilarity {
9880-
bm25?: IndicesSettingsSimilarityBm25
9881-
dfi?: IndicesSettingsSimilarityDfi
9882-
dfr?: IndicesSettingsSimilarityDfr
9883-
ib?: IndicesSettingsSimilarityIb
9884-
lmd?: IndicesSettingsSimilarityLmd
9885-
lmj?: IndicesSettingsSimilarityLmj
9886-
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
9887-
}
9881+
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted
98889882

98899883
export interface IndicesSettingsSimilarityBm25 {
9890-
b: double
9891-
discount_overlaps: boolean
9892-
k1: double
98939884
type: 'BM25'
9885+
b?: double
9886+
discount_overlaps?: boolean
9887+
k1?: double
9888+
}
9889+
9890+
export interface IndicesSettingsSimilarityBoolean {
9891+
type: 'boolean'
98949892
}
98959893

98969894
export interface IndicesSettingsSimilarityDfi {
9897-
independence_measure: DFIIndependenceMeasure
98989895
type: 'DFI'
9896+
independence_measure: DFIIndependenceMeasure
98999897
}
99009898

99019899
export interface IndicesSettingsSimilarityDfr {
9900+
type: 'DFR'
99029901
after_effect: DFRAfterEffect
99039902
basic_model: DFRBasicModel
99049903
normalization: Normalization
9905-
type: 'DFR'
99069904
}
99079905

99089906
export interface IndicesSettingsSimilarityIb {
9907+
type: 'IB'
99099908
distribution: IBDistribution
99109909
lambda: IBLambda
99119910
normalization: Normalization
9912-
type: 'IB'
99139911
}
99149912

99159913
export interface IndicesSettingsSimilarityLmd {
9916-
mu: integer
99179914
type: 'LMDirichlet'
9915+
mu?: double
99189916
}
99199917

99209918
export interface IndicesSettingsSimilarityLmj {
9921-
lambda: double
99229919
type: 'LMJelinekMercer'
9920+
lambda?: double
99239921
}
99249922

9925-
export interface IndicesSettingsSimilarityScriptedTfidf {
9926-
script: Script
9923+
export interface IndicesSettingsSimilarityScripted {
99279924
type: 'scripted'
9925+
script: Script
9926+
weight_script?: Script
99289927
}
99299928

99309929
export interface IndicesSlowlogSettings {
@@ -13139,8 +13138,8 @@ export interface MlTrainedModelLocationIndex {
1313913138
}
1314013139

1314113140
export interface MlTrainedModelPrefixStrings {
13142-
ingest: string
13143-
search: string
13141+
ingest?: string
13142+
search?: string
1314413143
}
1314513144

1314613145
export interface MlTrainedModelSizeStats {

src/api/typesWithBodyKey.ts

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

51485148
export interface MappingObjectProperty extends MappingCorePropertyBase {
51495149
enabled?: boolean
5150+
subobjects?: boolean
51505151
type?: 'object'
51515152
}
51525153

@@ -5321,6 +5322,7 @@ export interface MappingTypeMapping {
53215322
_source?: MappingSourceField
53225323
runtime?: Record<string, MappingRuntimeField>
53235324
enabled?: boolean
5325+
subobjects?: boolean
53245326
}
53255327

53265328
export interface MappingUnsignedLongNumberProperty extends MappingNumberPropertyBase {
@@ -9826,7 +9828,7 @@ export interface IndicesIndexSettingsKeys {
98269828
settings?: IndicesIndexSettings
98279829
time_series?: IndicesIndexSettingsTimeSeries
98289830
queries?: IndicesQueries
9829-
similarity?: IndicesSettingsSimilarity
9831+
similarity?: Record<string, IndicesSettingsSimilarity>
98309832
mapping?: IndicesMappingLimitSettings
98319833
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
98329834
indexing_pressure?: IndicesIndexingPressure
@@ -10002,55 +10004,52 @@ export interface IndicesSettingsSearch {
1000210004
slowlog?: IndicesSlowlogSettings
1000310005
}
1000410006

10005-
export interface IndicesSettingsSimilarity {
10006-
bm25?: IndicesSettingsSimilarityBm25
10007-
dfi?: IndicesSettingsSimilarityDfi
10008-
dfr?: IndicesSettingsSimilarityDfr
10009-
ib?: IndicesSettingsSimilarityIb
10010-
lmd?: IndicesSettingsSimilarityLmd
10011-
lmj?: IndicesSettingsSimilarityLmj
10012-
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
10013-
}
10007+
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted
1001410008

1001510009
export interface IndicesSettingsSimilarityBm25 {
10016-
b: double
10017-
discount_overlaps: boolean
10018-
k1: double
1001910010
type: 'BM25'
10011+
b?: double
10012+
discount_overlaps?: boolean
10013+
k1?: double
10014+
}
10015+
10016+
export interface IndicesSettingsSimilarityBoolean {
10017+
type: 'boolean'
1002010018
}
1002110019

1002210020
export interface IndicesSettingsSimilarityDfi {
10023-
independence_measure: DFIIndependenceMeasure
1002410021
type: 'DFI'
10022+
independence_measure: DFIIndependenceMeasure
1002510023
}
1002610024

1002710025
export interface IndicesSettingsSimilarityDfr {
10026+
type: 'DFR'
1002810027
after_effect: DFRAfterEffect
1002910028
basic_model: DFRBasicModel
1003010029
normalization: Normalization
10031-
type: 'DFR'
1003210030
}
1003310031

1003410032
export interface IndicesSettingsSimilarityIb {
10033+
type: 'IB'
1003510034
distribution: IBDistribution
1003610035
lambda: IBLambda
1003710036
normalization: Normalization
10038-
type: 'IB'
1003910037
}
1004010038

1004110039
export interface IndicesSettingsSimilarityLmd {
10042-
mu: integer
1004310040
type: 'LMDirichlet'
10041+
mu?: double
1004410042
}
1004510043

1004610044
export interface IndicesSettingsSimilarityLmj {
10047-
lambda: double
1004810045
type: 'LMJelinekMercer'
10046+
lambda?: double
1004910047
}
1005010048

10051-
export interface IndicesSettingsSimilarityScriptedTfidf {
10052-
script: Script
10049+
export interface IndicesSettingsSimilarityScripted {
1005310050
type: 'scripted'
10051+
script: Script
10052+
weight_script?: Script
1005410053
}
1005510054

1005610055
export interface IndicesSlowlogSettings {
@@ -13327,8 +13326,8 @@ export interface MlTrainedModelLocationIndex {
1332713326
}
1332813327

1332913328
export interface MlTrainedModelPrefixStrings {
13330-
ingest: string
13331-
search: string
13329+
ingest?: string
13330+
search?: string
1333213331
}
1333313332

1333413333
export interface MlTrainedModelSizeStats {

0 commit comments

Comments
 (0)