@opensearch-project/opensearch 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/OpenSearchApi.d.ts +4 -0
- package/api/_types/_common.analysis.d.ts +11 -1
- package/api/_types/_common.d.ts +2 -1
- package/api/_types/_common.query_dsl.d.ts +64 -39
- package/api/_types/_core.search.d.ts +134 -7
- package/api/_types/ml._common.d.ts +34 -0
- package/api/_types/search_pipeline._common.d.ts +2 -60
- package/api/asynchronousSearch/search.js +3 -3
- package/api/asynchronousSearch/stats.js +1 -1
- package/api/cluster/allocationExplain.js +4 -4
- package/api/cluster/deleteComponentTemplate.js +3 -3
- package/api/cluster/deleteDecommissionAwareness.js +1 -1
- package/api/cluster/deleteVotingConfigExclusions.js +2 -2
- package/api/cluster/existsComponentTemplate.js +4 -4
- package/api/cluster/getComponentTemplate.js +4 -4
- package/api/cluster/getDecommissionAwareness.js +2 -2
- package/api/cluster/getSettings.js +5 -5
- package/api/cluster/getWeightedRouting.js +1 -1
- package/api/cluster/health.js +14 -14
- package/api/cluster/pendingTasks.js +5 -5
- package/api/cluster/postVotingConfigExclusions.js +4 -4
- package/api/cluster/putComponentTemplate.js +6 -6
- package/api/cluster/putDecommissionAwareness.js +3 -3
- package/api/cluster/putSettings.js +5 -5
- package/api/cluster/putWeightedRouting.js +1 -1
- package/api/cluster/reroute.js +6 -6
- package/api/cluster/state.js +10 -10
- package/api/cluster/stats.js +5 -5
- package/api/index.d.ts +2 -0
- package/api/indices/simulateIndexTemplate.d.ts +5 -1
- package/api/ml/_api.js +3 -0
- package/api/ml/executeAlgorithm.d.ts +45 -0
- package/api/ml/executeAlgorithm.js +50 -0
- package/api/security/authinfo.js +3 -3
- package/api/security/authtoken.js +1 -1
- package/api/security/configUpgradeCheck.js +1 -1
- package/api/security/configUpgradePerform.js +1 -1
- package/api/security/createAllowlist.js +1 -1
- package/api/security/createRole.js +1 -1
- package/api/security/createRoleMapping.js +1 -1
- package/api/security/createTenant.js +1 -1
- package/api/security/createUpdateTenancyConfig.js +1 -1
- package/api/security/createUser.js +1 -1
- package/api/security/createUserLegacy.js +1 -1
- package/api/security/deleteActionGroup.js +1 -1
- package/api/security/deleteDistinguishedName.js +2 -2
- package/api/security/deleteRole.js +1 -1
- package/api/security/deleteRoleMapping.js +1 -1
- package/api/security/deleteTenant.js +1 -1
- package/api/security/deleteUser.js +1 -1
- package/api/security/flushCache.js +1 -1
- package/api/security/generateOboToken.js +1 -1
- package/api/security/generateUserToken.js +2 -2
- package/api/security/generateUserTokenLegacy.js +1 -1
- package/api/security/getAccountDetails.js +1 -1
- package/api/security/getAllCertificates.js +2 -2
- package/api/security/getAllowlist.js +1 -1
- package/api/security/getConfiguration.js +1 -1
- package/api/security/getDashboardsInfo.js +1 -1
- package/api/security/getDistinguishedName.js +3 -3
- package/api/security/getDistinguishedNames.js +2 -2
- package/api/security/getNodeCertificates.js +4 -4
- package/api/security/getPermissionsInfo.js +1 -1
- package/api/security/getRole.js +1 -1
- package/api/security/getRoleMapping.js +2 -2
- package/api/security/getSslinfo.js +2 -2
- package/api/security/getTenancyConfig.js +1 -1
- package/api/security/getTenant.js +1 -1
- package/api/security/getUser.js +1 -1
- package/api/security/health.js +2 -2
- package/api/security/migrate.js +1 -1
- package/api/security/patchActionGroup.js +1 -1
- package/api/security/patchActionGroups.js +1 -1
- package/api/security/patchAllowlist.js +1 -1
- package/api/security/patchAuditConfiguration.js +1 -1
- package/api/security/patchConfiguration.js +1 -1
- package/api/security/patchDistinguishedName.js +2 -2
- package/api/security/patchDistinguishedNames.js +1 -1
- package/api/security/patchRole.js +1 -1
- package/api/security/patchRoleMapping.js +2 -2
- package/api/security/patchRoleMappings.js +1 -1
- package/api/security/patchTenant.js +1 -1
- package/api/security/patchTenants.js +1 -1
- package/api/security/patchUser.js +1 -1
- package/api/security/patchUsers.js +1 -1
- package/api/security/postDashboardsInfo.js +1 -1
- package/api/security/reloadHttpCertificates.js +1 -1
- package/api/security/reloadTransportCertificates.js +1 -1
- package/api/security/tenantInfo.js +1 -1
- package/api/security/updateConfiguration.js +1 -1
- package/api/security/updateDistinguishedName.js +2 -2
- package/api/security/validate.js +1 -1
- package/api/security/whoAmI.js +1 -1
- package/api/security/whoAmIProtected.js +1 -1
- package/package.json +1 -1
package/api/OpenSearchApi.d.ts
CHANGED
|
@@ -693,6 +693,10 @@ export default class OpenSearchAPI {
|
|
|
693
693
|
};
|
|
694
694
|
|
|
695
695
|
ml: {
|
|
696
|
+
executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_ExecuteAlgorithm_Response>;
|
|
697
|
+
executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
|
|
698
|
+
executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
|
|
699
|
+
|
|
696
700
|
predict (params: API.Ml_Predict_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_Predict_Response>;
|
|
697
701
|
predict (params: API.Ml_Predict_Request, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
|
|
698
702
|
predict (params: API.Ml_Predict_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
|
|
@@ -493,6 +493,16 @@ export type SimpleAnalyzer = {
|
|
|
493
493
|
version?: Common.VersionString;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
+
export type SimplePatternSplitTokenizer = TokenizerBase & {
|
|
497
|
+
pattern?: string;
|
|
498
|
+
type: 'simple_pattern_split';
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export type SimplePatternTokenizer = TokenizerBase & {
|
|
502
|
+
pattern?: string;
|
|
503
|
+
type: 'simple_pattern';
|
|
504
|
+
}
|
|
505
|
+
|
|
496
506
|
export type SmartcnAnalyzer = {
|
|
497
507
|
type?: 'smartcn';
|
|
498
508
|
}
|
|
@@ -598,7 +608,7 @@ export type TokenizerBase = {
|
|
|
598
608
|
version?: Common.VersionString;
|
|
599
609
|
}
|
|
600
610
|
|
|
601
|
-
export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | IcuTokenizer | SmartcnTokenizer
|
|
611
|
+
export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | SimplePatternTokenizer | SimplePatternSplitTokenizer | IcuTokenizer | SmartcnTokenizer
|
|
602
612
|
|
|
603
613
|
export type TrimTokenFilter = TokenFilterBase & {
|
|
604
614
|
type: 'trim';
|
package/api/_types/_common.d.ts
CHANGED
|
@@ -271,6 +271,7 @@ export type GetStats = {
|
|
|
271
271
|
missing_time?: Duration;
|
|
272
272
|
missing_time_in_millis: DurationValueUnitMillis;
|
|
273
273
|
missing_total: number;
|
|
274
|
+
time?: Duration;
|
|
274
275
|
time_in_millis: DurationValueUnitMillis;
|
|
275
276
|
total: number;
|
|
276
277
|
}
|
|
@@ -825,7 +826,7 @@ export type TaskFailure = {
|
|
|
825
826
|
task_id: number;
|
|
826
827
|
}
|
|
827
828
|
|
|
828
|
-
export type TaskId = string
|
|
829
|
+
export type TaskId = string
|
|
829
830
|
|
|
830
831
|
export type TermFrequencyNormalization = 'h1' | 'h2' | 'h3' | 'no' | 'z'
|
|
831
832
|
|
|
@@ -61,11 +61,14 @@ export type ConstantScoreQuery = QueryBase & {
|
|
|
61
61
|
filter: QueryContainer;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export type
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
export type DateDecayPlacement = {
|
|
65
|
+
decay?: number;
|
|
66
|
+
offset?: Common.Duration;
|
|
67
|
+
origin?: Common.DateTime;
|
|
68
|
+
scale?: Common.Duration;
|
|
69
|
+
}
|
|
67
70
|
|
|
68
|
-
export type
|
|
71
|
+
export type DateRangeQueryParameters = {
|
|
69
72
|
format?: Common.DateFormat;
|
|
70
73
|
from?: Common.DateMath | undefined;
|
|
71
74
|
gt?: Common.DateMath;
|
|
@@ -76,30 +79,20 @@ export type DateRangeQuery = RangeQueryBase & {
|
|
|
76
79
|
to?: Common.DateMath | undefined;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
export type DecayFunction =
|
|
82
|
+
export type DecayFunction = DecayFunctionBase & Record<string, DecayPlacement>
|
|
80
83
|
|
|
81
84
|
export type DecayFunctionBase = {
|
|
82
85
|
multi_value_mode?: MultiValueMode;
|
|
83
86
|
}
|
|
84
87
|
|
|
88
|
+
export type DecayPlacement = DateDecayPlacement | GeoDecayPlacement | NumericDecayPlacement
|
|
89
|
+
|
|
85
90
|
export type DisMaxQuery = QueryBase & {
|
|
86
91
|
queries: QueryContainer[];
|
|
87
92
|
tie_breaker?: number;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
export type DistanceFeatureQuery =
|
|
91
|
-
|
|
92
|
-
export type DistanceFeatureQueryBaseDateMathDuration = QueryBase & {
|
|
93
|
-
field: Common.Field;
|
|
94
|
-
origin: Common.DateMath;
|
|
95
|
-
pivot: Common.Duration;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export type DistanceFeatureQueryBaseGeoLocationDistance = QueryBase & {
|
|
99
|
-
field: Common.Field;
|
|
100
|
-
origin: Common.GeoLocation;
|
|
101
|
-
pivot: Common.Distance;
|
|
102
|
-
}
|
|
95
|
+
export type DistanceFeatureQuery = QueryBase & Record<string, any>
|
|
103
96
|
|
|
104
97
|
export type ExistsQuery = QueryBase & {
|
|
105
98
|
field: Common.Field;
|
|
@@ -111,6 +104,13 @@ export type FieldAndFormat = Common.Field | {
|
|
|
111
104
|
include_unmapped?: boolean;
|
|
112
105
|
}
|
|
113
106
|
|
|
107
|
+
export type FieldLookup = {
|
|
108
|
+
id: Common.Id;
|
|
109
|
+
index?: Common.IndexName;
|
|
110
|
+
path?: Common.Field;
|
|
111
|
+
routing?: Common.Routing;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
114
|
export type FieldValueFactorModifier = 'ln' | 'ln1p' | 'ln2p' | 'log' | 'log1p' | 'log2p' | 'none' | 'reciprocal' | 'sqrt' | 'square'
|
|
115
115
|
|
|
116
116
|
export type FieldValueFactorScoreFunction = {
|
|
@@ -160,9 +160,12 @@ export type GeoBoundingBoxQuery = QueryBase & {
|
|
|
160
160
|
[key: string]: any | Common.GeoBounds;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
export type GeoDecayPlacement = {
|
|
164
|
+
decay?: number;
|
|
165
|
+
offset?: Common.Distance;
|
|
166
|
+
origin?: Common.GeoLocation;
|
|
167
|
+
scale?: Common.Distance;
|
|
168
|
+
}
|
|
166
169
|
|
|
167
170
|
export type GeoDistanceQuery = QueryBase & {
|
|
168
171
|
distance: Common.Distance;
|
|
@@ -174,9 +177,14 @@ export type GeoDistanceQuery = QueryBase & {
|
|
|
174
177
|
|
|
175
178
|
export type GeoExecution = 'indexed' | 'memory'
|
|
176
179
|
|
|
180
|
+
export type GeoPolygonPoints = {
|
|
181
|
+
points: Common.GeoLocation[];
|
|
182
|
+
}
|
|
183
|
+
|
|
177
184
|
export type GeoPolygonQuery = QueryBase & {
|
|
178
185
|
ignore_unmapped?: IgnoreUnmapped;
|
|
179
186
|
validation_method?: GeoValidationMethod;
|
|
187
|
+
[key: string]: any | GeoPolygonPoints;
|
|
180
188
|
}
|
|
181
189
|
|
|
182
190
|
export type GeoShape = {
|
|
@@ -184,14 +192,15 @@ export type GeoShape = {
|
|
|
184
192
|
type?: string;
|
|
185
193
|
}
|
|
186
194
|
|
|
187
|
-
export type GeoShapeField = {
|
|
188
|
-
relation?: Common.GeoShapeRelation;
|
|
189
|
-
shape: GeoShape;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
195
|
export type GeoShapeQuery = QueryBase & {
|
|
193
196
|
ignore_unmapped?: IgnoreUnmapped;
|
|
194
|
-
[key: string]: any |
|
|
197
|
+
[key: string]: any | GeoShapeQueryField;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type GeoShapeQueryField = {
|
|
201
|
+
indexed_shape?: FieldLookup;
|
|
202
|
+
relation?: Common.GeoShapeRelation;
|
|
203
|
+
shape: GeoShape;
|
|
195
204
|
}
|
|
196
205
|
|
|
197
206
|
export type GeoValidationMethod = 'coerce' | 'ignore_malformed' | 'strict'
|
|
@@ -297,15 +306,18 @@ export type IntervalsWildcard = {
|
|
|
297
306
|
}
|
|
298
307
|
|
|
299
308
|
export type KnnQuery = QueryBase & {
|
|
300
|
-
|
|
309
|
+
expand_nested_docs?: boolean;
|
|
310
|
+
filter?: QueryContainer;
|
|
301
311
|
k?: number;
|
|
302
312
|
max_distance?: number;
|
|
303
|
-
method_parameters?: Record<string,
|
|
313
|
+
method_parameters?: Record<string, any>;
|
|
304
314
|
min_score?: number;
|
|
305
|
-
rescore?:
|
|
315
|
+
rescore?: KnnQueryRescore;
|
|
306
316
|
vector: QueryVector;
|
|
307
317
|
}
|
|
308
318
|
|
|
319
|
+
export type KnnQueryRescore = boolean | RescoreContext
|
|
320
|
+
|
|
309
321
|
export type Like = string | LikeDocument
|
|
310
322
|
|
|
311
323
|
export type LikeDocument = {
|
|
@@ -429,16 +441,21 @@ export type NeuralQuery = QueryBase & {
|
|
|
429
441
|
query_text?: string;
|
|
430
442
|
}
|
|
431
443
|
|
|
432
|
-
export type
|
|
433
|
-
from?:
|
|
444
|
+
export type NumberRangeQueryParameters = {
|
|
445
|
+
from?: number | string | undefined;
|
|
434
446
|
gt?: number;
|
|
435
447
|
gte?: number;
|
|
436
448
|
lt?: number;
|
|
437
449
|
lte?: number;
|
|
438
|
-
to?:
|
|
450
|
+
to?: number | string | undefined;
|
|
439
451
|
}
|
|
440
452
|
|
|
441
|
-
export type
|
|
453
|
+
export type NumericDecayPlacement = {
|
|
454
|
+
decay?: number;
|
|
455
|
+
offset?: number;
|
|
456
|
+
origin?: number;
|
|
457
|
+
scale?: number;
|
|
458
|
+
}
|
|
442
459
|
|
|
443
460
|
export type Operator = 'and' | 'AND' | 'or' | 'OR'
|
|
444
461
|
|
|
@@ -573,7 +590,7 @@ export type RandomScoreFunction = {
|
|
|
573
590
|
seed?: number | string;
|
|
574
591
|
}
|
|
575
592
|
|
|
576
|
-
export type RangeQuery =
|
|
593
|
+
export type RangeQuery = RangeQueryBase & Record<string, any>
|
|
577
594
|
|
|
578
595
|
export type RangeQueryBase = QueryBase & {
|
|
579
596
|
relation?: RangeRelation;
|
|
@@ -614,6 +631,10 @@ export type RegexpQuery = string | (QueryBase & {
|
|
|
614
631
|
value: string;
|
|
615
632
|
})
|
|
616
633
|
|
|
634
|
+
export type RescoreContext = {
|
|
635
|
+
oversample_factor?: number;
|
|
636
|
+
}
|
|
637
|
+
|
|
617
638
|
export type ScriptQuery = QueryBase & {
|
|
618
639
|
script: Common.Script;
|
|
619
640
|
}
|
|
@@ -757,12 +778,16 @@ export type XyShape = {
|
|
|
757
778
|
type?: string;
|
|
758
779
|
}
|
|
759
780
|
|
|
760
|
-
export type
|
|
781
|
+
export type XyShapeQuery = QueryBase & {
|
|
782
|
+
ignore_unmapped?: boolean;
|
|
783
|
+
[key: string]: any | XyShapeQueryField;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export type XyShapeQueryField = {
|
|
787
|
+
indexed_shape?: FieldLookup;
|
|
761
788
|
relation?: Common.GeoShapeRelation;
|
|
762
789
|
shape: XyShape;
|
|
763
790
|
}
|
|
764
791
|
|
|
765
|
-
export type
|
|
766
|
-
|
|
767
|
-
export type ZeroTermsQuery = 'all' | 'none'
|
|
792
|
+
export type ZeroTermsQuery = 'all' | 'ALL' | 'none' | 'NONE'
|
|
768
793
|
|
|
@@ -52,21 +52,16 @@ export type AggregationProfileDebug = {
|
|
|
52
52
|
collection_strategy?: string;
|
|
53
53
|
deferred_aggregators?: string[];
|
|
54
54
|
delegate?: string;
|
|
55
|
-
delegate_debug?:
|
|
55
|
+
delegate_debug?: AggregationProfileDelegateDebug;
|
|
56
56
|
empty_collectors_used?: number;
|
|
57
57
|
extract_count?: number;
|
|
58
58
|
extract_ns?: number;
|
|
59
|
-
filters?: AggregationProfileDelegateDebugFilter[];
|
|
60
59
|
has_filter?: boolean;
|
|
61
60
|
map_reducer?: string;
|
|
62
61
|
numeric_collectors_used?: number;
|
|
63
62
|
ordinals_collectors_overhead_too_high?: number;
|
|
64
63
|
ordinals_collectors_used?: number;
|
|
65
64
|
result_strategy?: string;
|
|
66
|
-
segments_collected?: number;
|
|
67
|
-
segments_counted?: number;
|
|
68
|
-
segments_with_deleted_docs?: number;
|
|
69
|
-
segments_with_doc_count_field?: number;
|
|
70
65
|
segments_with_multi_valued_ords?: number;
|
|
71
66
|
segments_with_single_valued_ords?: number;
|
|
72
67
|
string_hashing_collectors_used?: number;
|
|
@@ -75,6 +70,14 @@ export type AggregationProfileDebug = {
|
|
|
75
70
|
values_fetched?: number;
|
|
76
71
|
}
|
|
77
72
|
|
|
73
|
+
export type AggregationProfileDelegateDebug = {
|
|
74
|
+
filters?: AggregationProfileDelegateDebugFilter[];
|
|
75
|
+
segments_collected?: number;
|
|
76
|
+
segments_counted?: number;
|
|
77
|
+
segments_with_deleted_docs?: number;
|
|
78
|
+
segments_with_doc_count_field?: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
78
81
|
export type AggregationProfileDelegateDebugFilter = {
|
|
79
82
|
query?: string;
|
|
80
83
|
results_from_metadata?: number;
|
|
@@ -93,10 +96,25 @@ export type Collector = {
|
|
|
93
96
|
time_in_nanos: Common.DurationValueUnitNanos;
|
|
94
97
|
}
|
|
95
98
|
|
|
99
|
+
export type CompletionContext = Context | {
|
|
100
|
+
boost?: number;
|
|
101
|
+
context: Context;
|
|
102
|
+
neighbours?: Common.GeoHashPrecision[];
|
|
103
|
+
precision?: Common.GeoHashPrecision;
|
|
104
|
+
prefix?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
export type CompletionSuggest = SuggestBase & {
|
|
97
108
|
options: CompletionSuggestOption | CompletionSuggestOption[];
|
|
98
109
|
}
|
|
99
110
|
|
|
111
|
+
export type CompletionSuggester = SuggesterBase & {
|
|
112
|
+
contexts?: Record<string, CompletionContext[]>;
|
|
113
|
+
fuzzy?: SuggestFuzziness;
|
|
114
|
+
regex?: string;
|
|
115
|
+
skip_duplicates?: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
100
118
|
export type CompletionSuggestOption = {
|
|
101
119
|
_id?: string;
|
|
102
120
|
_index?: Common.IndexName;
|
|
@@ -112,6 +130,20 @@ export type CompletionSuggestOption = {
|
|
|
112
130
|
|
|
113
131
|
export type Context = string | Common.GeoLocation
|
|
114
132
|
|
|
133
|
+
export type DirectGenerator = {
|
|
134
|
+
field: string;
|
|
135
|
+
max_edits?: number;
|
|
136
|
+
max_inspections?: number;
|
|
137
|
+
max_term_freq?: number;
|
|
138
|
+
min_doc_freq?: number;
|
|
139
|
+
min_word_length?: number;
|
|
140
|
+
post_filter?: string;
|
|
141
|
+
pre_filter?: string;
|
|
142
|
+
prefix_length?: number;
|
|
143
|
+
size?: number;
|
|
144
|
+
suggest_mode?: Common.SuggestMode;
|
|
145
|
+
}
|
|
146
|
+
|
|
115
147
|
export type FetchProfile = {
|
|
116
148
|
breakdown: FetchProfileBreakdown;
|
|
117
149
|
children?: FetchProfile[];
|
|
@@ -143,6 +175,15 @@ export type FieldCollapse = {
|
|
|
143
175
|
max_concurrent_group_searches?: number;
|
|
144
176
|
}
|
|
145
177
|
|
|
178
|
+
export type FieldSuggester = {
|
|
179
|
+
completion?: CompletionSuggester;
|
|
180
|
+
phrase?: PhraseSuggester;
|
|
181
|
+
prefix?: string;
|
|
182
|
+
regex?: string;
|
|
183
|
+
term?: TermSuggester;
|
|
184
|
+
text?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
146
187
|
export type Highlight = HighlightBase & {
|
|
147
188
|
encoder?: HighlighterEncoder;
|
|
148
189
|
fields: Record<string, HighlightField>;
|
|
@@ -240,6 +281,16 @@ export type InnerHitsResult = {
|
|
|
240
281
|
hits: HitsMetadata;
|
|
241
282
|
}
|
|
242
283
|
|
|
284
|
+
export type LaplaceSmoothingModel = {
|
|
285
|
+
alpha: number;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export type LinearInterpolationSmoothingModel = {
|
|
289
|
+
bigram_lambda: number;
|
|
290
|
+
trigram_lambda: number;
|
|
291
|
+
unigram_lambda: number;
|
|
292
|
+
}
|
|
293
|
+
|
|
243
294
|
export type NestedIdentity = {
|
|
244
295
|
_nested?: NestedIdentity;
|
|
245
296
|
field: Common.Field;
|
|
@@ -250,6 +301,38 @@ export type PhraseSuggest = SuggestBase & {
|
|
|
250
301
|
options: PhraseSuggestOption | PhraseSuggestOption[];
|
|
251
302
|
}
|
|
252
303
|
|
|
304
|
+
export type PhraseSuggestCollate = {
|
|
305
|
+
params?: Record<string, any>;
|
|
306
|
+
prune?: boolean;
|
|
307
|
+
query: PhraseSuggestCollateQuery;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export type PhraseSuggestCollateQuery = {
|
|
311
|
+
id?: string;
|
|
312
|
+
source?: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export type PhraseSuggester = SuggesterBase & {
|
|
316
|
+
collate?: PhraseSuggestCollate;
|
|
317
|
+
confidence?: number;
|
|
318
|
+
direct_generator?: DirectGenerator[];
|
|
319
|
+
force_unigrams?: boolean;
|
|
320
|
+
gram_size?: number;
|
|
321
|
+
highlight?: PhraseSuggestHighlight;
|
|
322
|
+
max_errors?: number;
|
|
323
|
+
real_word_error_likelihood?: number;
|
|
324
|
+
separator?: string;
|
|
325
|
+
shard_size?: number;
|
|
326
|
+
smoothing?: SmoothingModel;
|
|
327
|
+
text?: string;
|
|
328
|
+
token_limit?: number;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export type PhraseSuggestHighlight = {
|
|
332
|
+
post_tag: string;
|
|
333
|
+
pre_tag: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
253
336
|
export type PhraseSuggestOption = {
|
|
254
337
|
collate_match?: boolean;
|
|
255
338
|
highlighted?: string;
|
|
@@ -340,6 +423,12 @@ export type ShardProfile = {
|
|
|
340
423
|
searches: SearchProfile[];
|
|
341
424
|
}
|
|
342
425
|
|
|
426
|
+
export type SmoothingModel = {
|
|
427
|
+
laplace?: LaplaceSmoothingModel;
|
|
428
|
+
linear_interpolation?: LinearInterpolationSmoothingModel;
|
|
429
|
+
stupid_backoff?: StupidBackoffSmoothingModel;
|
|
430
|
+
}
|
|
431
|
+
|
|
343
432
|
export type SourceConfig = boolean | SourceFilter
|
|
344
433
|
|
|
345
434
|
export type SourceConfigParam = boolean | Common.Fields
|
|
@@ -349,6 +438,12 @@ export type SourceFilter = Common.Fields | {
|
|
|
349
438
|
includes?: Common.Fields;
|
|
350
439
|
}
|
|
351
440
|
|
|
441
|
+
export type StringDistance = 'damerau_levenshtein' | 'internal' | 'jaro_winkler' | 'levenshtein' | 'ngram'
|
|
442
|
+
|
|
443
|
+
export type StupidBackoffSmoothingModel = {
|
|
444
|
+
discount: number;
|
|
445
|
+
}
|
|
446
|
+
|
|
352
447
|
export type Suggest = CompletionSuggest | PhraseSuggest | TermSuggest
|
|
353
448
|
|
|
354
449
|
export type SuggestBase = {
|
|
@@ -359,15 +454,47 @@ export type SuggestBase = {
|
|
|
359
454
|
|
|
360
455
|
export type Suggester = {
|
|
361
456
|
text?: string;
|
|
457
|
+
[key: string]: any | FieldSuggester;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export type SuggesterBase = {
|
|
461
|
+
analyzer?: string;
|
|
462
|
+
field: string;
|
|
463
|
+
size?: number;
|
|
362
464
|
}
|
|
363
465
|
|
|
466
|
+
export type SuggestFuzziness = {
|
|
467
|
+
fuzziness: string;
|
|
468
|
+
min_length: number;
|
|
469
|
+
prefix_length: number;
|
|
470
|
+
transpositions: boolean;
|
|
471
|
+
unicode_aware: boolean;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export type SuggestSort = 'frequency' | 'score'
|
|
475
|
+
|
|
364
476
|
export type TermSuggest = SuggestBase & {
|
|
365
477
|
options: TermSuggestOption | TermSuggestOption[];
|
|
366
478
|
}
|
|
367
479
|
|
|
480
|
+
export type TermSuggester = SuggesterBase & {
|
|
481
|
+
lowercase_terms?: boolean;
|
|
482
|
+
max_edits?: number;
|
|
483
|
+
max_inspections?: number;
|
|
484
|
+
max_term_freq?: number;
|
|
485
|
+
min_doc_freq?: number;
|
|
486
|
+
min_word_length?: number;
|
|
487
|
+
prefix_length?: number;
|
|
488
|
+
shard_size?: number;
|
|
489
|
+
sort?: SuggestSort;
|
|
490
|
+
string_distance?: StringDistance;
|
|
491
|
+
suggest_mode?: Common.SuggestMode;
|
|
492
|
+
text?: string;
|
|
493
|
+
}
|
|
494
|
+
|
|
368
495
|
export type TermSuggestOption = {
|
|
369
496
|
collate_match?: boolean;
|
|
370
|
-
freq
|
|
497
|
+
freq?: number;
|
|
371
498
|
highlighted?: string;
|
|
372
499
|
score: number;
|
|
373
500
|
text: string;
|
|
@@ -31,6 +31,7 @@ export type AdditionalInfo = Record<string, any>
|
|
|
31
31
|
|
|
32
32
|
export type Aggregation = {
|
|
33
33
|
field?: string;
|
|
34
|
+
max?: Aggregation;
|
|
34
35
|
sum?: Aggregation;
|
|
35
36
|
[key: string]: any;
|
|
36
37
|
}
|
|
@@ -41,6 +42,7 @@ export type Algorithm = {
|
|
|
41
42
|
|
|
42
43
|
export type AlgorithmOperations = {
|
|
43
44
|
deploy?: ModelStats;
|
|
45
|
+
execute?: ModelStats;
|
|
44
46
|
predict?: ModelStats;
|
|
45
47
|
register?: ModelStats;
|
|
46
48
|
train?: ModelStats;
|
|
@@ -57,6 +59,13 @@ export type BoolQuery = {
|
|
|
57
59
|
should?: Filter[];
|
|
58
60
|
}
|
|
59
61
|
|
|
62
|
+
export type Buckets = {
|
|
63
|
+
end_time?: number;
|
|
64
|
+
entities?: Entity[];
|
|
65
|
+
overall_aggregate_value?: number;
|
|
66
|
+
start_time?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
60
69
|
export type ByteBuffer = {
|
|
61
70
|
array?: string;
|
|
62
71
|
order?: 'BIG_ENDIAN' | 'LITTLE_ENDIAN';
|
|
@@ -84,6 +93,26 @@ export type Credential = {
|
|
|
84
93
|
[key: string]: any;
|
|
85
94
|
}
|
|
86
95
|
|
|
96
|
+
export type Entity = {
|
|
97
|
+
base_value?: number;
|
|
98
|
+
contribution_value?: number;
|
|
99
|
+
key?: string[];
|
|
100
|
+
new_value?: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type ExecuteAlgorithmResponse = ExecuteLocalSampleCalculatorResponse | {
|
|
104
|
+
results?: ExecuteAnomalyLocalizationResponse[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ExecuteAnomalyLocalizationResponse = {
|
|
108
|
+
name?: string;
|
|
109
|
+
result?: Result;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type ExecuteLocalSampleCalculatorResponse = {
|
|
113
|
+
result?: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
87
116
|
export type Exists = {
|
|
88
117
|
field?: Common.Field;
|
|
89
118
|
}
|
|
@@ -258,6 +287,7 @@ export type ModelGroupRegistration = {
|
|
|
258
287
|
|
|
259
288
|
export type ModelProfile = {
|
|
260
289
|
deploy?: ModelStats;
|
|
290
|
+
execute?: ModelStats;
|
|
261
291
|
memory_size_estimation_cpu?: number;
|
|
262
292
|
memory_size_estimation_gpu?: number;
|
|
263
293
|
model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED';
|
|
@@ -396,6 +426,10 @@ export type RateLimiter = {
|
|
|
396
426
|
unit: 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS';
|
|
397
427
|
}
|
|
398
428
|
|
|
429
|
+
export type Result = {
|
|
430
|
+
buckets?: Buckets[];
|
|
431
|
+
}
|
|
432
|
+
|
|
399
433
|
export type Rows = {
|
|
400
434
|
values?: Values[];
|
|
401
435
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* modify the API generator.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import * as Common_QueryDsl from './_common.query_dsl'
|
|
17
18
|
|
|
18
19
|
export type CollapseResponseProcessor = {
|
|
19
20
|
context_prefix?: string;
|
|
@@ -26,7 +27,7 @@ export type CollapseResponseProcessor = {
|
|
|
26
27
|
export type FilterQueryRequestProcessor = {
|
|
27
28
|
description?: string;
|
|
28
29
|
ignore_failure?: boolean;
|
|
29
|
-
query?:
|
|
30
|
+
query?: Common_QueryDsl.QueryContainer;
|
|
30
31
|
tag?: string;
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -188,62 +189,3 @@ export type TruncateHitsResponseProcessor = {
|
|
|
188
189
|
target_size?: number;
|
|
189
190
|
}
|
|
190
191
|
|
|
191
|
-
export type UserDefinedObjectStructure = {
|
|
192
|
-
bool?: any;
|
|
193
|
-
boosting?: any;
|
|
194
|
-
combined_fields?: any;
|
|
195
|
-
constant_score?: any;
|
|
196
|
-
dis_max?: any;
|
|
197
|
-
distance_feature?: any;
|
|
198
|
-
exists?: any;
|
|
199
|
-
field_masking_span?: any;
|
|
200
|
-
function_score?: any;
|
|
201
|
-
fuzzy?: UserDefinedValueMap;
|
|
202
|
-
geo_bounding_box?: any;
|
|
203
|
-
geo_distance?: any;
|
|
204
|
-
geo_polygon?: any;
|
|
205
|
-
geo_shape?: any;
|
|
206
|
-
has_child?: any;
|
|
207
|
-
has_parent?: any;
|
|
208
|
-
ids?: any;
|
|
209
|
-
intervals?: UserDefinedValueMap;
|
|
210
|
-
knn?: any;
|
|
211
|
-
match?: UserDefinedValueMap;
|
|
212
|
-
match_all?: any;
|
|
213
|
-
match_bool_prefix?: UserDefinedValueMap;
|
|
214
|
-
match_none?: any;
|
|
215
|
-
match_phrase?: UserDefinedValueMap;
|
|
216
|
-
match_phrase_prefix?: UserDefinedValueMap;
|
|
217
|
-
more_like_this?: any;
|
|
218
|
-
multi_match?: any;
|
|
219
|
-
nested?: any;
|
|
220
|
-
parent_id?: any;
|
|
221
|
-
percolate?: any;
|
|
222
|
-
pinned?: any;
|
|
223
|
-
prefix?: UserDefinedValueMap;
|
|
224
|
-
query_string?: any;
|
|
225
|
-
range?: UserDefinedValueMap;
|
|
226
|
-
rank_feature?: any;
|
|
227
|
-
regexp?: UserDefinedValueMap;
|
|
228
|
-
script?: any;
|
|
229
|
-
script_score?: any;
|
|
230
|
-
shape?: any;
|
|
231
|
-
simple_query_string?: any;
|
|
232
|
-
span_containing?: any;
|
|
233
|
-
span_first?: any;
|
|
234
|
-
span_multi?: any;
|
|
235
|
-
span_near?: any;
|
|
236
|
-
span_not?: any;
|
|
237
|
-
span_or?: any;
|
|
238
|
-
span_term?: UserDefinedValueMap;
|
|
239
|
-
span_within?: any;
|
|
240
|
-
term?: UserDefinedValueMap;
|
|
241
|
-
terms?: any;
|
|
242
|
-
terms_set?: UserDefinedValueMap;
|
|
243
|
-
wildcard?: UserDefinedValueMap;
|
|
244
|
-
wrapper?: any;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export type UserDefinedValueMap = {
|
|
248
|
-
}
|
|
249
|
-
|
|
@@ -26,9 +26,9 @@ const { normalizeArguments } = require('../utils');
|
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
28
|
* @param {string} [params.index] - The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index names.
|
|
29
|
-
* @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query
|
|
30
|
-
* @param {boolean} [params.keep_on_completion] - Whether
|
|
31
|
-
* @param {string} [params.wait_for_completion_timeout] - The amount of time
|
|
29
|
+
* @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query exceeds this amount of time, the process cancels this query automatically.
|
|
30
|
+
* @param {boolean} [params.keep_on_completion] - Whether to save the results in the cluster after the search is complete. You can examine the stored results at a later time.
|
|
31
|
+
* @param {string} [params.wait_for_completion_timeout] - The amount of time to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`.
|
|
32
32
|
* @param {object} [params.body] - The search definition using the Query DSL.
|
|
33
33
|
*
|
|
34
34
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Monitors any asynchronous searches that are `running`, `completed`, `persisted`.
|
|
22
|
+
* Monitors any asynchronous searches that are `running`, `completed`, or `persisted`.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats - asynchronous_search.stats}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Asynchronous-Search
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ - cluster.allocation_explain}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {boolean} [params.include_disk_info=false] -
|
|
29
|
-
* @param {boolean} [params.include_yes_decisions=false] -
|
|
30
|
-
* @param {object} [params.body] - The index, shard, and primary flag to
|
|
28
|
+
* @param {boolean} [params.include_disk_info=false] - When `true`, returns information about disk usage and shard sizes.
|
|
29
|
+
* @param {boolean} [params.include_yes_decisions=false] - When `true`, returns any `YES` decisions in the allocation explanation.
|
|
30
|
+
* @param {object} [params.body] - The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard.
|
|
31
31
|
*
|
|
32
32
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
33
33
|
* @param {function} [callback] - Callback that handles errors and response
|