@opensearch-project/opensearch 2.0.0 → 2.2.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/.eslintrc.json +13 -5
- package/ADMINS.md +13 -38
- package/CHANGELOG.md +54 -0
- package/COMPATIBILITY.md +4 -1
- package/MAINTAINERS.md +11 -73
- package/Makefile +2 -12
- package/README.md +4 -107
- package/RELEASING.md +7 -1
- package/USER_GUIDE.md +248 -0
- package/api/api/bulk.js +24 -2
- package/api/api/cat.js +320 -2
- package/api/api/clear_scroll.js +15 -2
- package/api/api/cluster.js +238 -2
- package/api/api/count.js +29 -2
- package/api/api/create.js +27 -2
- package/api/api/create_pit.js +88 -0
- package/api/api/dangling_indices.js +46 -2
- package/api/api/delete.js +24 -2
- package/api/api/delete_all_pits.js +53 -0
- package/api/api/delete_by_query.js +49 -2
- package/api/api/delete_by_query_rethrottle.js +15 -2
- package/api/api/delete_pit.js +61 -0
- package/api/api/delete_script.js +15 -2
- package/api/api/exists.js +26 -2
- package/api/api/exists_source.js +26 -2
- package/api/api/explain.js +28 -2
- package/api/api/features.js +25 -2
- package/api/api/field_caps.js +20 -2
- package/api/api/get.js +26 -2
- package/api/api/get_all_pits.js +53 -0
- package/api/api/get_script.js +17 -2
- package/api/api/get_script_context.js +12 -2
- package/api/api/get_script_languages.js +12 -2
- package/api/api/get_source.js +26 -2
- package/api/api/index.js +30 -2
- package/api/api/indices.js +816 -2
- package/api/api/info.js +12 -2
- package/api/api/ingest.js +90 -2
- package/api/api/mget.js +25 -2
- package/api/api/msearch.js +23 -2
- package/api/api/msearch_template.js +20 -2
- package/api/api/mtermvectors.js +1 -2
- package/api/api/nodes.js +92 -2
- package/api/api/ping.js +12 -2
- package/api/api/put_script.js +18 -2
- package/api/api/rank_eval.js +20 -2
- package/api/api/reindex.js +23 -2
- package/api/api/reindex_rethrottle.js +15 -2
- package/api/api/render_search_template.js +15 -2
- package/api/api/scripts_painless_execute.js +14 -2
- package/api/api/scroll.js +18 -2
- package/api/api/search.js +61 -2
- package/api/api/search_shards.js +20 -2
- package/api/api/search_template.js +28 -2
- package/api/api/shutdown.js +4 -2
- package/api/api/snapshot.js +211 -2
- package/api/api/tasks.js +57 -2
- package/api/api/terms_enum.js +2 -2
- package/api/api/termvectors.js +27 -2
- package/api/api/update.js +29 -2
- package/api/api/update_by_query.js +51 -2
- package/api/api/update_by_query_rethrottle.js +15 -2
- package/api/index.js +29 -2
- package/api/new.d.ts +65 -2
- package/api/opensearch_dashboards.d.ts +5 -2
- package/api/requestParams.d.ts +17 -2
- package/api/types.d.ts +48 -2
- package/api/utils.js +1 -2
- package/index.d.ts +605 -120
- package/index.js +2 -3
- package/index.mjs +1 -2
- package/jenkins/release.JenkinsFile +11 -0
- package/lib/Connection.d.ts +1 -2
- package/lib/Connection.js +5 -4
- package/lib/Helpers.d.ts +5 -4
- package/lib/Helpers.js +13 -17
- package/lib/Serializer.d.ts +1 -2
- package/lib/Serializer.js +2 -3
- package/lib/Transport.d.ts +10 -4
- package/lib/Transport.js +34 -7
- package/lib/aws/AwsSigv4Signer.js +176 -0
- package/lib/aws/errors.js +24 -0
- package/lib/aws/index.d.ts +39 -0
- package/lib/aws/index.js +19 -0
- package/lib/errors.d.ts +1 -2
- package/lib/errors.js +1 -2
- package/lib/pool/BaseConnectionPool.js +1 -2
- package/lib/pool/CloudConnectionPool.js +1 -2
- package/lib/pool/ConnectionPool.js +1 -2
- package/lib/pool/index.d.ts +1 -2
- package/lib/pool/index.js +1 -2
- package/package.json +36 -18
package/api/api/bulk.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
2
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
3
4
|
*
|
|
4
5
|
* The OpenSearch Contributors require contributions made to
|
|
5
6
|
* this file be licensed under the Apache-2.0 license or a
|
|
6
7
|
* compatible open source license.
|
|
7
8
|
*
|
|
8
|
-
* Modifications Copyright OpenSearch Contributors. See
|
|
9
|
-
* GitHub history for details.
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
11
|
/*
|
|
@@ -64,6 +63,29 @@ const snakeCase = {
|
|
|
64
63
|
filterPath: 'filter_path',
|
|
65
64
|
};
|
|
66
65
|
|
|
66
|
+
/**
|
|
67
|
+
* The bulk operation lets you add, update, or delete many documents in a single request.
|
|
68
|
+
* Compared to individual OpenSearch indexing requests, the bulk operation has significant performance benefits.
|
|
69
|
+
* Whenever practical, we recommend batching indexing operations into bulk requests.
|
|
70
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/|OpenSearch - Bulk}
|
|
71
|
+
*
|
|
72
|
+
* @memberOf API-Document
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} params
|
|
75
|
+
* @param {Object[]} params.body - {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/#request-body|Request Body}
|
|
76
|
+
* @param {string} [params.index] - Specifying the index means you don’t need to include it in the request body.
|
|
77
|
+
* @param {string} [params.pipeline] - The pipeline ID for preprocessing documents.
|
|
78
|
+
* @param {string} [params.routing] - Routes the request to the specified shard.
|
|
79
|
+
* @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation.
|
|
80
|
+
* @param {string} [params.timeout=1m] - How long to wait for a response from the cluster.
|
|
81
|
+
* @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed.
|
|
82
|
+
* @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias.
|
|
83
|
+
*
|
|
84
|
+
* @param {Object} options - Options for {@link Transport#request}
|
|
85
|
+
* @param {function} callback - Callback that handles errors and response
|
|
86
|
+
*
|
|
87
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/#response|Bulk Response}
|
|
88
|
+
*/
|
|
67
89
|
function bulkApi(params, options, callback) {
|
|
68
90
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
69
91
|
|
package/api/api/cat.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
2
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
3
4
|
*
|
|
4
5
|
* The OpenSearch Contributors require contributions made to
|
|
5
6
|
* this file be licensed under the Apache-2.0 license or a
|
|
6
7
|
* compatible open source license.
|
|
7
8
|
*
|
|
8
|
-
* Modifications Copyright OpenSearch Contributors. See
|
|
9
|
-
* GitHub history for details.
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
11
|
/*
|
|
@@ -33,6 +32,8 @@
|
|
|
33
32
|
/* eslint camelcase: 0 */
|
|
34
33
|
/* eslint no-unused-vars: 0 */
|
|
35
34
|
|
|
35
|
+
/** @namespace API-CAT */
|
|
36
|
+
|
|
36
37
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils');
|
|
37
38
|
const acceptedQuerystring = [
|
|
38
39
|
'format',
|
|
@@ -70,6 +71,7 @@ const acceptedQuerystring = [
|
|
|
70
71
|
'nodes',
|
|
71
72
|
'actions',
|
|
72
73
|
'parent_task_id',
|
|
74
|
+
'pri',
|
|
73
75
|
];
|
|
74
76
|
const snakeCase = {
|
|
75
77
|
expandWildcards: 'expand_wildcards',
|
|
@@ -93,6 +95,22 @@ function CatApi(transport, ConfigurationError) {
|
|
|
93
95
|
this[kConfigurationError] = ConfigurationError;
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
/**
|
|
99
|
+
* The CAT aliases operation lists the mapping of aliases to indices, plus routing and filtering information.
|
|
100
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ OpenSearch - CAT aliases}
|
|
101
|
+
*
|
|
102
|
+
* @memberOf API-CAT
|
|
103
|
+
*
|
|
104
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
105
|
+
* @param {string} [params.name] - To limit the information to specific aliases, provide the alias names seperated by commas.
|
|
106
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
107
|
+
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. Default is 'open'.
|
|
108
|
+
*
|
|
109
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
110
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
111
|
+
*
|
|
112
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/#response CAT aliases Response}
|
|
113
|
+
*/
|
|
96
114
|
CatApi.prototype.aliases = function catAliasesApi(params, options, callback) {
|
|
97
115
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
98
116
|
|
|
@@ -119,6 +137,23 @@ CatApi.prototype.aliases = function catAliasesApi(params, options, callback) {
|
|
|
119
137
|
return this.transport.request(request, options, callback);
|
|
120
138
|
};
|
|
121
139
|
|
|
140
|
+
/**
|
|
141
|
+
* The CAT allocation operation lists the allocation of disk space for indices and the number of shards on each node.
|
|
142
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ OpenSearch - CAT allocation}
|
|
143
|
+
*
|
|
144
|
+
* @memberOf API-CAT
|
|
145
|
+
*
|
|
146
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
147
|
+
* @param {string} [params.node_id] - To limit the information to specific nodes, provide the node names seperated by commas.
|
|
148
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
149
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
150
|
+
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'.
|
|
151
|
+
*
|
|
152
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
153
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
154
|
+
*
|
|
155
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/#response CAT allocation Response}
|
|
156
|
+
*/
|
|
122
157
|
CatApi.prototype.allocation = function catAllocationApi(params, options, callback) {
|
|
123
158
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
124
159
|
|
|
@@ -145,6 +180,20 @@ CatApi.prototype.allocation = function catAllocationApi(params, options, callbac
|
|
|
145
180
|
return this.transport.request(request, options, callback);
|
|
146
181
|
};
|
|
147
182
|
|
|
183
|
+
/**
|
|
184
|
+
* The CAT count operation lists the number of documents in your cluster.
|
|
185
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/ OpenSearch - CAT count}
|
|
186
|
+
*
|
|
187
|
+
* @memberOf API-CAT
|
|
188
|
+
*
|
|
189
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
190
|
+
* @param {string} [params.index] - To see the number of documents in specific indices or aliases, provide the index/alias names seperated by commas.
|
|
191
|
+
*
|
|
192
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
193
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
194
|
+
*
|
|
195
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/#response CAT count Response}
|
|
196
|
+
*/
|
|
148
197
|
CatApi.prototype.count = function catCountApi(params, options, callback) {
|
|
149
198
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
150
199
|
|
|
@@ -171,6 +220,20 @@ CatApi.prototype.count = function catCountApi(params, options, callback) {
|
|
|
171
220
|
return this.transport.request(request, options, callback);
|
|
172
221
|
};
|
|
173
222
|
|
|
223
|
+
/**
|
|
224
|
+
* The CAT fielddata operation lists the memory size used by each field per node.
|
|
225
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ OpenSearch - CAT fielddata}
|
|
226
|
+
*
|
|
227
|
+
* @memberOf API-CAT
|
|
228
|
+
*
|
|
229
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
230
|
+
* @param {string} [params.fields] - To limit the information to specific fields, provide the field names seperated by commas.
|
|
231
|
+
*
|
|
232
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
233
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
234
|
+
*
|
|
235
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/#response CAT fielddata Response}
|
|
236
|
+
*/
|
|
174
237
|
CatApi.prototype.fielddata = function catFielddataApi(params, options, callback) {
|
|
175
238
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
176
239
|
|
|
@@ -197,6 +260,22 @@ CatApi.prototype.fielddata = function catFielddataApi(params, options, callback)
|
|
|
197
260
|
return this.transport.request(request, options, callback);
|
|
198
261
|
};
|
|
199
262
|
|
|
263
|
+
/**
|
|
264
|
+
* The CAT health operation lists the status of the cluster, how long the cluster has been up, the number of nodes,
|
|
265
|
+
* and other useful information that helps you analyze the health of your cluster.
|
|
266
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/ OpenSearch - CAT health}
|
|
267
|
+
*
|
|
268
|
+
* @memberOf API-CAT
|
|
269
|
+
*
|
|
270
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
271
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
272
|
+
* @param {boolean} [params.ts=true] - If true, returns HH:MM:SS and Unix epoch timestamps.
|
|
273
|
+
*
|
|
274
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
275
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
276
|
+
*
|
|
277
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/#response CAT health Response}
|
|
278
|
+
*/
|
|
200
279
|
CatApi.prototype.health = function catHealthApi(params, options, callback) {
|
|
201
280
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
202
281
|
|
|
@@ -218,6 +297,18 @@ CatApi.prototype.health = function catHealthApi(params, options, callback) {
|
|
|
218
297
|
return this.transport.request(request, options, callback);
|
|
219
298
|
};
|
|
220
299
|
|
|
300
|
+
/**
|
|
301
|
+
* See the available operations in the CAT API
|
|
302
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/index OpenSearch - CAT}
|
|
303
|
+
*
|
|
304
|
+
* @memberOf API-CAT
|
|
305
|
+
*
|
|
306
|
+
* @param {Object} params - (ignored)
|
|
307
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
308
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
309
|
+
*
|
|
310
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
311
|
+
*/
|
|
221
312
|
CatApi.prototype.help = function catHelpApi(params, options, callback) {
|
|
222
313
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
223
314
|
|
|
@@ -239,6 +330,27 @@ CatApi.prototype.help = function catHelpApi(params, options, callback) {
|
|
|
239
330
|
return this.transport.request(request, options, callback);
|
|
240
331
|
};
|
|
241
332
|
|
|
333
|
+
/**
|
|
334
|
+
* The CAT indices operation lists information related to indices—how much disk space they are using, how many shards they have, their health status, and so on.
|
|
335
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ OpenSearch - CAT indices}
|
|
336
|
+
*
|
|
337
|
+
* @memberOf API-CAT
|
|
338
|
+
*
|
|
339
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
340
|
+
* @param {string} [params.index] - To limit the information to specific indices, provide the index names seperated by commas.
|
|
341
|
+
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'.
|
|
342
|
+
* @param {string} [params.health] - Limit indices based on their health status. Supported values are 'green', 'yellow', and 'red'.
|
|
343
|
+
* @param {boolean} [params.include_unloaded_segments=false] - Whether to include information from segments not loaded into memory.
|
|
344
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
345
|
+
* @param {boolean} [params.pri=false] - Whether to return information only from the primary shards.
|
|
346
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
347
|
+
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'.
|
|
348
|
+
*
|
|
349
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
350
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
351
|
+
*
|
|
352
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/#response CAT indices Response}
|
|
353
|
+
*/
|
|
242
354
|
CatApi.prototype.indices = function catIndicesApi(params, options, callback) {
|
|
243
355
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
244
356
|
|
|
@@ -265,6 +377,18 @@ CatApi.prototype.indices = function catIndicesApi(params, options, callback) {
|
|
|
265
377
|
return this.transport.request(request, options, callback);
|
|
266
378
|
};
|
|
267
379
|
|
|
380
|
+
/**
|
|
381
|
+
* The CAT cluster manager operation lists information that helps identify the elected cluster manager node.
|
|
382
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ OpenSearch - CAT cluster manager}
|
|
383
|
+
*
|
|
384
|
+
* @memberOf API-CAT
|
|
385
|
+
*
|
|
386
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters}
|
|
387
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
388
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
389
|
+
*
|
|
390
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/#response CAT cluster manager Response}
|
|
391
|
+
*/
|
|
268
392
|
CatApi.prototype.cluster_manager = function catClusterManagerApi(params, options, callback) {
|
|
269
393
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
270
394
|
|
|
@@ -311,6 +435,21 @@ CatApi.prototype.master = function catMasterApi(params, options, callback) {
|
|
|
311
435
|
return this.transport.request(request, options, callback);
|
|
312
436
|
};
|
|
313
437
|
|
|
438
|
+
/**
|
|
439
|
+
* The CAT nodeattrs operation lists the attributes of custom nodes.
|
|
440
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ OpenSearch - CAT aliases}
|
|
441
|
+
*
|
|
442
|
+
* @memberOf API-CAT
|
|
443
|
+
*
|
|
444
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
445
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
446
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
447
|
+
*
|
|
448
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
449
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
450
|
+
*
|
|
451
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/#response CAT nodeattrs Response}
|
|
452
|
+
*/
|
|
314
453
|
CatApi.prototype.nodeattrs = function catNodeattrsApi(params, options, callback) {
|
|
315
454
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
316
455
|
|
|
@@ -332,6 +471,25 @@ CatApi.prototype.nodeattrs = function catNodeattrsApi(params, options, callback)
|
|
|
332
471
|
return this.transport.request(request, options, callback);
|
|
333
472
|
};
|
|
334
473
|
|
|
474
|
+
/**
|
|
475
|
+
* The CAT nodes operation lists node-level information, including node roles and load metrics.
|
|
476
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ OpenSearch - CAT nodes}
|
|
477
|
+
*
|
|
478
|
+
* @memberOf API-CAT
|
|
479
|
+
*
|
|
480
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
481
|
+
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'.
|
|
482
|
+
* @param {boolean} [params.full_id=false] - If true, return the full node ID. If false, return the shortened node ID.
|
|
483
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node.
|
|
484
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
485
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
486
|
+
* @param {boolean} [params.include_unloaded_segments=false] - Whether to include information from segments not loaded into memory.
|
|
487
|
+
*
|
|
488
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
489
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
490
|
+
*
|
|
491
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/#response CAT nodes Response}
|
|
492
|
+
*/
|
|
335
493
|
CatApi.prototype.nodes = function catNodesApi(params, options, callback) {
|
|
336
494
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
337
495
|
|
|
@@ -353,6 +511,22 @@ CatApi.prototype.nodes = function catNodesApi(params, options, callback) {
|
|
|
353
511
|
return this.transport.request(request, options, callback);
|
|
354
512
|
};
|
|
355
513
|
|
|
514
|
+
/**
|
|
515
|
+
* The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue.
|
|
516
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ OpenSearch - CAT pending tasks}
|
|
517
|
+
*
|
|
518
|
+
* @memberOf API-CAT
|
|
519
|
+
*
|
|
520
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
521
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node.
|
|
522
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
523
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
524
|
+
*
|
|
525
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
526
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
527
|
+
*
|
|
528
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/#response CAT pending tasks Response}
|
|
529
|
+
*/
|
|
356
530
|
CatApi.prototype.pendingTasks = function catPendingTasksApi(params, options, callback) {
|
|
357
531
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
358
532
|
|
|
@@ -374,6 +548,21 @@ CatApi.prototype.pendingTasks = function catPendingTasksApi(params, options, cal
|
|
|
374
548
|
return this.transport.request(request, options, callback);
|
|
375
549
|
};
|
|
376
550
|
|
|
551
|
+
/**
|
|
552
|
+
* The CAT plugins operation lists the names, components, and versions of the installed plugins.
|
|
553
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ OpenSearch - CAT plugins}
|
|
554
|
+
*
|
|
555
|
+
* @memberOf API-CAT
|
|
556
|
+
*
|
|
557
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
558
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node.
|
|
559
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
560
|
+
*
|
|
561
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
562
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
563
|
+
*
|
|
564
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/#response CAT plugins Response}
|
|
565
|
+
*/
|
|
377
566
|
CatApi.prototype.plugins = function catPluginsApi(params, options, callback) {
|
|
378
567
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
379
568
|
|
|
@@ -395,6 +584,23 @@ CatApi.prototype.plugins = function catPluginsApi(params, options, callback) {
|
|
|
395
584
|
return this.transport.request(request, options, callback);
|
|
396
585
|
};
|
|
397
586
|
|
|
587
|
+
/**
|
|
588
|
+
* The CAT recovery operation lists all completed and ongoing index and shard recoveries.
|
|
589
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/ OpenSearch - CAT recovery}
|
|
590
|
+
*
|
|
591
|
+
* @memberOf API-CAT
|
|
592
|
+
*
|
|
593
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
594
|
+
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'.
|
|
595
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
596
|
+
* @param {boolean} [params.active_only=false] - Whether to only include ongoing shard recoveries.
|
|
597
|
+
* @param {boolean} [params.detailed=false] - Whether to only include ongoing shard recoveries.
|
|
598
|
+
*
|
|
599
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
600
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
601
|
+
*
|
|
602
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/#response CAT recovery Response}
|
|
603
|
+
*/
|
|
398
604
|
CatApi.prototype.recovery = function catRecoveryApi(params, options, callback) {
|
|
399
605
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
400
606
|
|
|
@@ -421,6 +627,21 @@ CatApi.prototype.recovery = function catRecoveryApi(params, options, callback) {
|
|
|
421
627
|
return this.transport.request(request, options, callback);
|
|
422
628
|
};
|
|
423
629
|
|
|
630
|
+
/**
|
|
631
|
+
* The CAT repositories operation lists all completed and ongoing index and shard recoveries.
|
|
632
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ OpenSearch - CAT repositories}
|
|
633
|
+
*
|
|
634
|
+
* @memberOf API-CAT
|
|
635
|
+
*
|
|
636
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
637
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node.
|
|
638
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
639
|
+
*
|
|
640
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
641
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
642
|
+
*
|
|
643
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/#response CAT repositories Response}
|
|
644
|
+
*/
|
|
424
645
|
CatApi.prototype.repositories = function catRepositoriesApi(params, options, callback) {
|
|
425
646
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
426
647
|
|
|
@@ -442,6 +663,22 @@ CatApi.prototype.repositories = function catRepositoriesApi(params, options, cal
|
|
|
442
663
|
return this.transport.request(request, options, callback);
|
|
443
664
|
};
|
|
444
665
|
|
|
666
|
+
/**
|
|
667
|
+
* The cat segments operation lists Lucene segment-level information for each index.
|
|
668
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ OpenSearch - CAT segments}
|
|
669
|
+
*
|
|
670
|
+
* @memberOf API-CAT
|
|
671
|
+
*
|
|
672
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
673
|
+
* @param {string} [params.index] - To see only the information about segments of specific indices, provide the index names seperated by commas.
|
|
674
|
+
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'.
|
|
675
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
676
|
+
*
|
|
677
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
678
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
679
|
+
*
|
|
680
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/#response CAT segments Response}
|
|
681
|
+
*/
|
|
445
682
|
CatApi.prototype.segments = function catSegmentsApi(params, options, callback) {
|
|
446
683
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
447
684
|
|
|
@@ -468,6 +705,24 @@ CatApi.prototype.segments = function catSegmentsApi(params, options, callback) {
|
|
|
468
705
|
return this.transport.request(request, options, callback);
|
|
469
706
|
};
|
|
470
707
|
|
|
708
|
+
/**
|
|
709
|
+
* The CAT shards operation lists the state of all primary and replica shards and how they are distributed.
|
|
710
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ OpenSearch - CAT shards}
|
|
711
|
+
*
|
|
712
|
+
* @memberOf API-CAT
|
|
713
|
+
*
|
|
714
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
715
|
+
* @param {string} [params.index] - To see only the information about shards of specific indices, provide the index names seperated by commas.
|
|
716
|
+
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'.
|
|
717
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node.
|
|
718
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
719
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
720
|
+
*
|
|
721
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
722
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
723
|
+
*
|
|
724
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/#response CAT shards Response}
|
|
725
|
+
*/
|
|
471
726
|
CatApi.prototype.shards = function catShardsApi(params, options, callback) {
|
|
472
727
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
473
728
|
|
|
@@ -494,6 +749,21 @@ CatApi.prototype.shards = function catShardsApi(params, options, callback) {
|
|
|
494
749
|
return this.transport.request(request, options, callback);
|
|
495
750
|
};
|
|
496
751
|
|
|
752
|
+
/**
|
|
753
|
+
* The CAT snapshots operation lists all snapshots for a repository.
|
|
754
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ OpenSearch - CAT snapshots}
|
|
755
|
+
*
|
|
756
|
+
* @memberOf API-CAT
|
|
757
|
+
*
|
|
758
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
759
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
760
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
761
|
+
*
|
|
762
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
763
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
764
|
+
*
|
|
765
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/#response CAT snapshots Response}
|
|
766
|
+
*/
|
|
497
767
|
CatApi.prototype.snapshots = function catSnapshotsApi(params, options, callback) {
|
|
498
768
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
499
769
|
|
|
@@ -520,6 +790,23 @@ CatApi.prototype.snapshots = function catSnapshotsApi(params, options, callback)
|
|
|
520
790
|
return this.transport.request(request, options, callback);
|
|
521
791
|
};
|
|
522
792
|
|
|
793
|
+
/**
|
|
794
|
+
* The CAT tasks operation lists the progress of all tasks currently running on your cluster.
|
|
795
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ OpenSearch - CAT tasks}
|
|
796
|
+
*
|
|
797
|
+
* @memberOf API-CAT
|
|
798
|
+
*
|
|
799
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
800
|
+
* @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information. Use '_local' to return information from the node you’re connecting to, specify the node name to get information from specific nodes, or keep the parameter empty to get information from all nodes.
|
|
801
|
+
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'.
|
|
802
|
+
* @param {boolean} [params.detailed=false] - Returns detailed task information.
|
|
803
|
+
* @param {string} [params.parent_task_id] - Returns tasks with a specified parent task ID (node_id:task_number). Keep empty or set to -1 to return all.
|
|
804
|
+
*
|
|
805
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
806
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
807
|
+
*
|
|
808
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/#response CAT tasks Response}
|
|
809
|
+
*/
|
|
523
810
|
CatApi.prototype.tasks = function catTasksApi(params, options, callback) {
|
|
524
811
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
525
812
|
|
|
@@ -541,6 +828,22 @@ CatApi.prototype.tasks = function catTasksApi(params, options, callback) {
|
|
|
541
828
|
return this.transport.request(request, options, callback);
|
|
542
829
|
};
|
|
543
830
|
|
|
831
|
+
/**
|
|
832
|
+
* The CAT templates operation lists the names, patterns, order numbers, and version numbers of index templates.
|
|
833
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ OpenSearch - CAT templates}
|
|
834
|
+
*
|
|
835
|
+
* @memberOf API-CAT
|
|
836
|
+
*
|
|
837
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
838
|
+
* @param {boolean} [params.name] - If you want to limit it to a specific template or pattern, provide the template name or pattern.
|
|
839
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
840
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
841
|
+
*
|
|
842
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
843
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
844
|
+
*
|
|
845
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/#response CAT templates Response}
|
|
846
|
+
*/
|
|
544
847
|
CatApi.prototype.templates = function catTemplatesApi(params, options, callback) {
|
|
545
848
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
546
849
|
|
|
@@ -567,6 +870,21 @@ CatApi.prototype.templates = function catTemplatesApi(params, options, callback)
|
|
|
567
870
|
return this.transport.request(request, options, callback);
|
|
568
871
|
};
|
|
569
872
|
|
|
873
|
+
/**
|
|
874
|
+
* The CAT thread pool operation lists the active, queued, and rejected threads of different thread pools on each node.
|
|
875
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ OpenSearch - CAT thread pool}
|
|
876
|
+
*
|
|
877
|
+
* @memberOf API-CAT
|
|
878
|
+
*
|
|
879
|
+
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters:
|
|
880
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
881
|
+
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node.
|
|
882
|
+
*
|
|
883
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
884
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
885
|
+
*
|
|
886
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/#response CAT thread pool Response}
|
|
887
|
+
*/
|
|
570
888
|
CatApi.prototype.threadPool = function catThreadPoolApi(params, options, callback) {
|
|
571
889
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
572
890
|
|
package/api/api/clear_scroll.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
2
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
3
4
|
*
|
|
4
5
|
* The OpenSearch Contributors require contributions made to
|
|
5
6
|
* this file be licensed under the Apache-2.0 license or a
|
|
6
7
|
* compatible open source license.
|
|
7
8
|
*
|
|
8
|
-
* Modifications Copyright OpenSearch Contributors. See
|
|
9
|
-
* GitHub history for details.
|
|
10
9
|
*/
|
|
11
10
|
|
|
12
11
|
/*
|
|
@@ -37,6 +36,20 @@ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } =
|
|
|
37
36
|
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path'];
|
|
38
37
|
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' };
|
|
39
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Close the search context when you’re done scrolling, because the scroll operation continues to consume computing resources until the timeout.
|
|
41
|
+
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/ OpenSearch - Scroll }
|
|
42
|
+
*
|
|
43
|
+
* @memberOf API-Search
|
|
44
|
+
*
|
|
45
|
+
* @param {Object} params
|
|
46
|
+
* @param {string} [params.scroll_id] The ID of the scroll to be terminated. Use `_all` to close all open scroll contexts.
|
|
47
|
+
*
|
|
48
|
+
* @param {Object} [options] - Options for {@link Transport#request}
|
|
49
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
50
|
+
*
|
|
51
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
52
|
+
*/
|
|
40
53
|
function clearScrollApi(params, options, callback) {
|
|
41
54
|
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
42
55
|
|