@opensearch-project/opensearch 1.1.0 → 2.1.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/.eslintignore +2 -0
- package/.eslintrc.json +31 -0
- package/.prettierrc.json +5 -0
- package/.whitesource +15 -0
- package/ADMINS.md +13 -31
- package/CHANGELOG.md +24 -0
- package/COMPATIBILITY.md +27 -0
- package/DEVELOPER_GUIDE.md +22 -5
- package/MAINTAINERS.md +15 -70
- package/Makefile +2 -12
- package/README.md +19 -123
- package/RELEASING.md +3 -3
- package/SECURITY.md +1 -1
- package/USER_GUIDE.md +197 -0
- package/api/api/bulk.js +54 -28
- package/api/api/cat.js +355 -266
- package/api/api/clear_scroll.js +18 -19
- package/api/api/cluster.js +367 -221
- package/api/api/count.js +56 -26
- package/api/api/create.js +51 -26
- package/api/api/dangling_indices.js +96 -53
- package/api/api/delete.js +50 -24
- package/api/api/delete_by_query.js +89 -27
- package/api/api/delete_by_query_rethrottle.js +34 -21
- package/api/api/delete_script.js +32 -19
- package/api/api/exists.js +56 -24
- package/api/api/exists_source.js +61 -29
- package/api/api/explain.js +61 -24
- package/api/api/features.js +57 -37
- package/api/api/field_caps.js +37 -20
- package/api/api/get.js +56 -24
- package/api/api/get_script.js +31 -19
- package/api/api/get_script_context.js +16 -17
- package/api/api/get_script_languages.js +16 -17
- package/api/api/get_source.js +56 -24
- package/api/api/index.js +61 -30
- package/api/api/indices.js +1069 -859
- package/api/api/info.js +16 -17
- package/api/api/ingest.js +133 -98
- package/api/api/mget.js +51 -28
- package/api/api/msearch.js +50 -28
- package/api/api/msearch_template.js +54 -28
- package/api/api/mtermvectors.js +49 -26
- package/api/api/nodes.js +282 -156
- package/api/api/ping.js +16 -17
- package/api/api/put_script.js +41 -27
- package/api/api/rank_eval.js +38 -22
- package/api/api/reindex.js +39 -19
- package/api/api/reindex_rethrottle.js +33 -21
- package/api/api/render_search_template.js +19 -20
- package/api/api/scripts_painless_execute.js +16 -17
- package/api/api/scroll.js +32 -19
- package/api/api/search.js +109 -26
- package/api/api/search_shards.js +37 -20
- package/api/api/search_template.js +65 -28
- package/api/api/shutdown.js +67 -56
- package/api/api/snapshot.js +348 -226
- package/api/api/tasks.js +66 -48
- package/api/api/terms_enum.js +18 -19
- package/api/api/termvectors.js +58 -28
- package/api/api/update.js +65 -26
- package/api/api/update_by_query.js +90 -25
- package/api/api/update_by_query_rethrottle.js +34 -21
- package/api/index.js +268 -181
- package/api/new.d.ts +2043 -531
- package/api/opensearch_dashboards.d.ts +240 -238
- package/api/requestParams.d.ts +302 -71
- package/api/types.d.ts +6205 -5721
- package/api/utils.js +23 -24
- package/codecov.yml +2 -2
- package/index.d.ts +5203 -1037
- package/index.js +154 -143
- package/index.mjs +10 -11
- package/jenkins/release.JenkinsFile +11 -0
- package/lib/Connection.d.ts +38 -28
- package/lib/Connection.js +166 -170
- package/lib/Helpers.d.ts +108 -68
- package/lib/Helpers.js +401 -378
- package/lib/Serializer.d.ts +3 -4
- package/lib/Serializer.js +40 -41
- package/lib/Transport.d.ts +39 -15
- package/lib/Transport.js +381 -337
- package/lib/aws/AwsSigv4Signer.js +167 -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 +26 -9
- package/lib/errors.js +76 -73
- package/lib/pool/BaseConnectionPool.js +101 -99
- package/lib/pool/CloudConnectionPool.js +17 -18
- package/lib/pool/ConnectionPool.js +106 -107
- package/lib/pool/index.d.ts +9 -8
- package/lib/pool/index.js +7 -8
- package/package.json +37 -15
package/api/api/indices.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
|
/*
|
|
@@ -28,70 +27,157 @@
|
|
|
28
27
|
* under the License.
|
|
29
28
|
*/
|
|
30
29
|
|
|
31
|
-
'use strict'
|
|
30
|
+
'use strict';
|
|
32
31
|
|
|
33
32
|
/* eslint camelcase: 0 */
|
|
34
33
|
/* eslint no-unused-vars: 0 */
|
|
35
34
|
|
|
36
|
-
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
|
37
|
-
const acceptedQuerystring = [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils');
|
|
36
|
+
const acceptedQuerystring = [
|
|
37
|
+
'cluster_manager_timeout',
|
|
38
|
+
'timeout',
|
|
39
|
+
'master_timeout',
|
|
40
|
+
'ignore_unavailable',
|
|
41
|
+
'allow_no_indices',
|
|
42
|
+
'expand_wildcards',
|
|
43
|
+
'pretty',
|
|
44
|
+
'human',
|
|
45
|
+
'error_trace',
|
|
46
|
+
'source',
|
|
47
|
+
'filter_path',
|
|
48
|
+
'index',
|
|
49
|
+
'fielddata',
|
|
50
|
+
'fields',
|
|
51
|
+
'query',
|
|
52
|
+
'request',
|
|
53
|
+
'wait_for_active_shards',
|
|
54
|
+
'run_expensive_tasks',
|
|
55
|
+
'flush',
|
|
56
|
+
'local',
|
|
57
|
+
'flat_settings',
|
|
58
|
+
'include_defaults',
|
|
59
|
+
'force',
|
|
60
|
+
'wait_if_ongoing',
|
|
61
|
+
'max_num_segments',
|
|
62
|
+
'only_expunge_deletes',
|
|
63
|
+
'create',
|
|
64
|
+
'cause',
|
|
65
|
+
'write_index_only',
|
|
66
|
+
'preserve_existing',
|
|
67
|
+
'order',
|
|
68
|
+
'detailed',
|
|
69
|
+
'active_only',
|
|
70
|
+
'dry_run',
|
|
71
|
+
'verbose',
|
|
72
|
+
'status',
|
|
73
|
+
'copy_settings',
|
|
74
|
+
'completion_fields',
|
|
75
|
+
'fielddata_fields',
|
|
76
|
+
'groups',
|
|
77
|
+
'level',
|
|
78
|
+
'types',
|
|
79
|
+
'include_segment_file_sizes',
|
|
80
|
+
'include_unloaded_segments',
|
|
81
|
+
'forbid_closed_indices',
|
|
82
|
+
'wait_for_completion',
|
|
83
|
+
'only_ancient_segments',
|
|
84
|
+
'explain',
|
|
85
|
+
'q',
|
|
86
|
+
'analyzer',
|
|
87
|
+
'analyze_wildcard',
|
|
88
|
+
'default_operator',
|
|
89
|
+
'df',
|
|
90
|
+
'lenient',
|
|
91
|
+
'rewrite',
|
|
92
|
+
'all_shards',
|
|
93
|
+
];
|
|
94
|
+
const snakeCase = {
|
|
95
|
+
clusterManagerTimeout: 'cluster_manager_timeout',
|
|
96
|
+
masterTimeout: 'master_timeout',
|
|
97
|
+
ignoreUnavailable: 'ignore_unavailable',
|
|
98
|
+
allowNoIndices: 'allow_no_indices',
|
|
99
|
+
expandWildcards: 'expand_wildcards',
|
|
100
|
+
errorTrace: 'error_trace',
|
|
101
|
+
filterPath: 'filter_path',
|
|
102
|
+
waitForActiveShards: 'wait_for_active_shards',
|
|
103
|
+
runExpensiveTasks: 'run_expensive_tasks',
|
|
104
|
+
flatSettings: 'flat_settings',
|
|
105
|
+
includeDefaults: 'include_defaults',
|
|
106
|
+
waitIfOngoing: 'wait_if_ongoing',
|
|
107
|
+
maxNumSegments: 'max_num_segments',
|
|
108
|
+
onlyExpungeDeletes: 'only_expunge_deletes',
|
|
109
|
+
writeIndexOnly: 'write_index_only',
|
|
110
|
+
preserveExisting: 'preserve_existing',
|
|
111
|
+
activeOnly: 'active_only',
|
|
112
|
+
dryRun: 'dry_run',
|
|
113
|
+
copySettings: 'copy_settings',
|
|
114
|
+
completionFields: 'completion_fields',
|
|
115
|
+
fielddataFields: 'fielddata_fields',
|
|
116
|
+
includeSegmentFileSizes: 'include_segment_file_sizes',
|
|
117
|
+
includeUnloadedSegments: 'include_unloaded_segments',
|
|
118
|
+
forbidClosedIndices: 'forbid_closed_indices',
|
|
119
|
+
waitForCompletion: 'wait_for_completion',
|
|
120
|
+
onlyAncientSegments: 'only_ancient_segments',
|
|
121
|
+
analyzeWildcard: 'analyze_wildcard',
|
|
122
|
+
defaultOperator: 'default_operator',
|
|
123
|
+
allShards: 'all_shards',
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
function IndicesApi(transport, ConfigurationError) {
|
|
127
|
+
this.transport = transport;
|
|
128
|
+
this[kConfigurationError] = ConfigurationError;
|
|
43
129
|
}
|
|
44
130
|
|
|
45
|
-
IndicesApi.prototype.addBlock = function indicesAddBlockApi
|
|
46
|
-
|
|
131
|
+
IndicesApi.prototype.addBlock = function indicesAddBlockApi(params, options, callback) {
|
|
132
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
47
133
|
|
|
48
134
|
// check required parameters
|
|
49
135
|
if (params.index == null) {
|
|
50
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
51
|
-
return handleError(err, callback)
|
|
136
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
137
|
+
return handleError(err, callback);
|
|
52
138
|
}
|
|
53
139
|
if (params.block == null) {
|
|
54
|
-
const err = new this[kConfigurationError]('Missing required parameter: block')
|
|
55
|
-
return handleError(err, callback)
|
|
140
|
+
const err = new this[kConfigurationError]('Missing required parameter: block');
|
|
141
|
+
return handleError(err, callback);
|
|
56
142
|
}
|
|
57
143
|
|
|
58
144
|
// check required url components
|
|
59
|
-
if (params.block != null &&
|
|
60
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
61
|
-
return handleError(err, callback)
|
|
145
|
+
if (params.block != null && params.index == null) {
|
|
146
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
147
|
+
return handleError(err, callback);
|
|
62
148
|
}
|
|
63
149
|
|
|
64
|
-
let { method, body, index, block, ...querystring } = params
|
|
65
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
150
|
+
let { method, body, index, block, ...querystring } = params;
|
|
151
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
66
152
|
|
|
67
|
-
let path = ''
|
|
68
|
-
if (method == null) method = 'PUT'
|
|
69
|
-
path = '/' + encodeURIComponent(index) + '/' + '_block' + '/' + encodeURIComponent(block)
|
|
153
|
+
let path = '';
|
|
154
|
+
if (method == null) method = 'PUT';
|
|
155
|
+
path = '/' + encodeURIComponent(index) + '/' + '_block' + '/' + encodeURIComponent(block);
|
|
70
156
|
|
|
71
157
|
// build request object
|
|
72
158
|
const request = {
|
|
73
159
|
method,
|
|
74
160
|
path,
|
|
75
161
|
body: body || '',
|
|
76
|
-
querystring
|
|
77
|
-
}
|
|
162
|
+
querystring,
|
|
163
|
+
};
|
|
78
164
|
|
|
79
|
-
return this.transport.request(request, options, callback)
|
|
80
|
-
}
|
|
165
|
+
return this.transport.request(request, options, callback);
|
|
166
|
+
};
|
|
81
167
|
|
|
82
|
-
IndicesApi.prototype.analyze = function indicesAnalyzeApi
|
|
83
|
-
|
|
168
|
+
IndicesApi.prototype.analyze = function indicesAnalyzeApi(params, options, callback) {
|
|
169
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
84
170
|
|
|
85
|
-
let { method, body, index, ...querystring } = params
|
|
86
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
171
|
+
let { method, body, index, ...querystring } = params;
|
|
172
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
87
173
|
|
|
88
|
-
let path = ''
|
|
89
|
-
if (
|
|
90
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
91
|
-
path = '/' + encodeURIComponent(index) + '/' + '_analyze'
|
|
174
|
+
let path = '';
|
|
175
|
+
if (index != null) {
|
|
176
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
177
|
+
path = '/' + encodeURIComponent(index) + '/' + '_analyze';
|
|
92
178
|
} else {
|
|
93
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
94
|
-
path = '/' + '_analyze'
|
|
179
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
180
|
+
path = '/' + '_analyze';
|
|
95
181
|
}
|
|
96
182
|
|
|
97
183
|
// build request object
|
|
@@ -99,25 +185,25 @@ IndicesApi.prototype.analyze = function indicesAnalyzeApi (params, options, call
|
|
|
99
185
|
method,
|
|
100
186
|
path,
|
|
101
187
|
body: body || '',
|
|
102
|
-
querystring
|
|
103
|
-
}
|
|
188
|
+
querystring,
|
|
189
|
+
};
|
|
104
190
|
|
|
105
|
-
return this.transport.request(request, options, callback)
|
|
106
|
-
}
|
|
191
|
+
return this.transport.request(request, options, callback);
|
|
192
|
+
};
|
|
107
193
|
|
|
108
|
-
IndicesApi.prototype.clearCache = function indicesClearCacheApi
|
|
109
|
-
|
|
194
|
+
IndicesApi.prototype.clearCache = function indicesClearCacheApi(params, options, callback) {
|
|
195
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
110
196
|
|
|
111
|
-
let { method, body, index, ...querystring } = params
|
|
112
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
197
|
+
let { method, body, index, ...querystring } = params;
|
|
198
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
113
199
|
|
|
114
|
-
let path = ''
|
|
115
|
-
if (
|
|
116
|
-
if (method == null) method = 'POST'
|
|
117
|
-
path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear'
|
|
200
|
+
let path = '';
|
|
201
|
+
if (index != null) {
|
|
202
|
+
if (method == null) method = 'POST';
|
|
203
|
+
path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear';
|
|
118
204
|
} else {
|
|
119
|
-
if (method == null) method = 'POST'
|
|
120
|
-
path = '/' + '_cache' + '/' + 'clear'
|
|
205
|
+
if (method == null) method = 'POST';
|
|
206
|
+
path = '/' + '_cache' + '/' + 'clear';
|
|
121
207
|
}
|
|
122
208
|
|
|
123
209
|
// build request object
|
|
@@ -125,159 +211,159 @@ IndicesApi.prototype.clearCache = function indicesClearCacheApi (params, options
|
|
|
125
211
|
method,
|
|
126
212
|
path,
|
|
127
213
|
body: body || '',
|
|
128
|
-
querystring
|
|
129
|
-
}
|
|
214
|
+
querystring,
|
|
215
|
+
};
|
|
130
216
|
|
|
131
|
-
return this.transport.request(request, options, callback)
|
|
132
|
-
}
|
|
217
|
+
return this.transport.request(request, options, callback);
|
|
218
|
+
};
|
|
133
219
|
|
|
134
|
-
IndicesApi.prototype.clone = function indicesCloneApi
|
|
135
|
-
|
|
220
|
+
IndicesApi.prototype.clone = function indicesCloneApi(params, options, callback) {
|
|
221
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
136
222
|
|
|
137
223
|
// check required parameters
|
|
138
224
|
if (params.index == null) {
|
|
139
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
140
|
-
return handleError(err, callback)
|
|
225
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
226
|
+
return handleError(err, callback);
|
|
141
227
|
}
|
|
142
228
|
if (params.target == null) {
|
|
143
|
-
const err = new this[kConfigurationError]('Missing required parameter: target')
|
|
144
|
-
return handleError(err, callback)
|
|
229
|
+
const err = new this[kConfigurationError]('Missing required parameter: target');
|
|
230
|
+
return handleError(err, callback);
|
|
145
231
|
}
|
|
146
232
|
|
|
147
233
|
// check required url components
|
|
148
|
-
if (params.target != null &&
|
|
149
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
150
|
-
return handleError(err, callback)
|
|
234
|
+
if (params.target != null && params.index == null) {
|
|
235
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
236
|
+
return handleError(err, callback);
|
|
151
237
|
}
|
|
152
238
|
|
|
153
|
-
let { method, body, index, target, ...querystring } = params
|
|
154
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
239
|
+
let { method, body, index, target, ...querystring } = params;
|
|
240
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
155
241
|
|
|
156
|
-
let path = ''
|
|
157
|
-
if (method == null) method = 'PUT'
|
|
158
|
-
path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target)
|
|
242
|
+
let path = '';
|
|
243
|
+
if (method == null) method = 'PUT';
|
|
244
|
+
path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target);
|
|
159
245
|
|
|
160
246
|
// build request object
|
|
161
247
|
const request = {
|
|
162
248
|
method,
|
|
163
249
|
path,
|
|
164
250
|
body: body || '',
|
|
165
|
-
querystring
|
|
166
|
-
}
|
|
251
|
+
querystring,
|
|
252
|
+
};
|
|
167
253
|
|
|
168
|
-
return this.transport.request(request, options, callback)
|
|
169
|
-
}
|
|
254
|
+
return this.transport.request(request, options, callback);
|
|
255
|
+
};
|
|
170
256
|
|
|
171
|
-
IndicesApi.prototype.close = function indicesCloseApi
|
|
172
|
-
|
|
257
|
+
IndicesApi.prototype.close = function indicesCloseApi(params, options, callback) {
|
|
258
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
173
259
|
|
|
174
260
|
// check required parameters
|
|
175
261
|
if (params.index == null) {
|
|
176
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
177
|
-
return handleError(err, callback)
|
|
262
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
263
|
+
return handleError(err, callback);
|
|
178
264
|
}
|
|
179
265
|
|
|
180
|
-
let { method, body, index, ...querystring } = params
|
|
181
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
266
|
+
let { method, body, index, ...querystring } = params;
|
|
267
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
182
268
|
|
|
183
|
-
let path = ''
|
|
184
|
-
if (method == null) method = 'POST'
|
|
185
|
-
path = '/' + encodeURIComponent(index) + '/' + '_close'
|
|
269
|
+
let path = '';
|
|
270
|
+
if (method == null) method = 'POST';
|
|
271
|
+
path = '/' + encodeURIComponent(index) + '/' + '_close';
|
|
186
272
|
|
|
187
273
|
// build request object
|
|
188
274
|
const request = {
|
|
189
275
|
method,
|
|
190
276
|
path,
|
|
191
277
|
body: body || '',
|
|
192
|
-
querystring
|
|
193
|
-
}
|
|
278
|
+
querystring,
|
|
279
|
+
};
|
|
194
280
|
|
|
195
|
-
return this.transport.request(request, options, callback)
|
|
196
|
-
}
|
|
281
|
+
return this.transport.request(request, options, callback);
|
|
282
|
+
};
|
|
197
283
|
|
|
198
|
-
IndicesApi.prototype.create = function indicesCreateApi
|
|
199
|
-
|
|
284
|
+
IndicesApi.prototype.create = function indicesCreateApi(params, options, callback) {
|
|
285
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
200
286
|
|
|
201
287
|
// check required parameters
|
|
202
288
|
if (params.index == null) {
|
|
203
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
204
|
-
return handleError(err, callback)
|
|
289
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
290
|
+
return handleError(err, callback);
|
|
205
291
|
}
|
|
206
292
|
|
|
207
|
-
let { method, body, index, ...querystring } = params
|
|
208
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
293
|
+
let { method, body, index, ...querystring } = params;
|
|
294
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
209
295
|
|
|
210
|
-
let path = ''
|
|
211
|
-
if (method == null) method = 'PUT'
|
|
212
|
-
path = '/' + encodeURIComponent(index)
|
|
296
|
+
let path = '';
|
|
297
|
+
if (method == null) method = 'PUT';
|
|
298
|
+
path = '/' + encodeURIComponent(index);
|
|
213
299
|
|
|
214
300
|
// build request object
|
|
215
301
|
const request = {
|
|
216
302
|
method,
|
|
217
303
|
path,
|
|
218
304
|
body: body || '',
|
|
219
|
-
querystring
|
|
220
|
-
}
|
|
305
|
+
querystring,
|
|
306
|
+
};
|
|
221
307
|
|
|
222
|
-
return this.transport.request(request, options, callback)
|
|
223
|
-
}
|
|
308
|
+
return this.transport.request(request, options, callback);
|
|
309
|
+
};
|
|
224
310
|
|
|
225
|
-
IndicesApi.prototype.delete = function indicesDeleteApi
|
|
226
|
-
|
|
311
|
+
IndicesApi.prototype.delete = function indicesDeleteApi(params, options, callback) {
|
|
312
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
227
313
|
|
|
228
314
|
// check required parameters
|
|
229
315
|
if (params.index == null) {
|
|
230
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
231
|
-
return handleError(err, callback)
|
|
316
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
317
|
+
return handleError(err, callback);
|
|
232
318
|
}
|
|
233
319
|
|
|
234
|
-
let { method, body, index, ...querystring } = params
|
|
235
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
320
|
+
let { method, body, index, ...querystring } = params;
|
|
321
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
236
322
|
|
|
237
|
-
let path = ''
|
|
238
|
-
if (method == null) method = 'DELETE'
|
|
239
|
-
path = '/' + encodeURIComponent(index)
|
|
323
|
+
let path = '';
|
|
324
|
+
if (method == null) method = 'DELETE';
|
|
325
|
+
path = '/' + encodeURIComponent(index);
|
|
240
326
|
|
|
241
327
|
// build request object
|
|
242
328
|
const request = {
|
|
243
329
|
method,
|
|
244
330
|
path,
|
|
245
331
|
body: body || '',
|
|
246
|
-
querystring
|
|
247
|
-
}
|
|
332
|
+
querystring,
|
|
333
|
+
};
|
|
248
334
|
|
|
249
|
-
return this.transport.request(request, options, callback)
|
|
250
|
-
}
|
|
335
|
+
return this.transport.request(request, options, callback);
|
|
336
|
+
};
|
|
251
337
|
|
|
252
|
-
IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi
|
|
253
|
-
|
|
338
|
+
IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi(params, options, callback) {
|
|
339
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
254
340
|
|
|
255
341
|
// check required parameters
|
|
256
342
|
if (params.index == null) {
|
|
257
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
258
|
-
return handleError(err, callback)
|
|
343
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
344
|
+
return handleError(err, callback);
|
|
259
345
|
}
|
|
260
346
|
if (params.name == null) {
|
|
261
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
262
|
-
return handleError(err, callback)
|
|
347
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
348
|
+
return handleError(err, callback);
|
|
263
349
|
}
|
|
264
350
|
|
|
265
351
|
// check required url components
|
|
266
|
-
if (params.name != null &&
|
|
267
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
268
|
-
return handleError(err, callback)
|
|
352
|
+
if (params.name != null && params.index == null) {
|
|
353
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
354
|
+
return handleError(err, callback);
|
|
269
355
|
}
|
|
270
356
|
|
|
271
|
-
let { method, body, index, name, ...querystring } = params
|
|
272
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
357
|
+
let { method, body, index, name, ...querystring } = params;
|
|
358
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
273
359
|
|
|
274
|
-
let path = ''
|
|
275
|
-
if (
|
|
276
|
-
if (method == null) method = 'DELETE'
|
|
277
|
-
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
360
|
+
let path = '';
|
|
361
|
+
if (index != null && name != null) {
|
|
362
|
+
if (method == null) method = 'DELETE';
|
|
363
|
+
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name);
|
|
278
364
|
} else {
|
|
279
|
-
if (method == null) method = 'DELETE'
|
|
280
|
-
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
|
365
|
+
if (method == null) method = 'DELETE';
|
|
366
|
+
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name);
|
|
281
367
|
}
|
|
282
368
|
|
|
283
369
|
// build request object
|
|
@@ -285,139 +371,143 @@ IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi (params, optio
|
|
|
285
371
|
method,
|
|
286
372
|
path,
|
|
287
373
|
body: body || '',
|
|
288
|
-
querystring
|
|
289
|
-
}
|
|
374
|
+
querystring,
|
|
375
|
+
};
|
|
290
376
|
|
|
291
|
-
return this.transport.request(request, options, callback)
|
|
292
|
-
}
|
|
377
|
+
return this.transport.request(request, options, callback);
|
|
378
|
+
};
|
|
293
379
|
|
|
294
|
-
IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateApi
|
|
295
|
-
|
|
380
|
+
IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateApi(
|
|
381
|
+
params,
|
|
382
|
+
options,
|
|
383
|
+
callback
|
|
384
|
+
) {
|
|
385
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
296
386
|
|
|
297
387
|
// check required parameters
|
|
298
388
|
if (params.name == null) {
|
|
299
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
300
|
-
return handleError(err, callback)
|
|
389
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
390
|
+
return handleError(err, callback);
|
|
301
391
|
}
|
|
302
392
|
|
|
303
|
-
let { method, body, name, ...querystring } = params
|
|
304
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
393
|
+
let { method, body, name, ...querystring } = params;
|
|
394
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
305
395
|
|
|
306
|
-
let path = ''
|
|
307
|
-
if (method == null) method = 'DELETE'
|
|
308
|
-
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
396
|
+
let path = '';
|
|
397
|
+
if (method == null) method = 'DELETE';
|
|
398
|
+
path = '/' + '_index_template' + '/' + encodeURIComponent(name);
|
|
309
399
|
|
|
310
400
|
// build request object
|
|
311
401
|
const request = {
|
|
312
402
|
method,
|
|
313
403
|
path,
|
|
314
404
|
body: body || '',
|
|
315
|
-
querystring
|
|
316
|
-
}
|
|
405
|
+
querystring,
|
|
406
|
+
};
|
|
317
407
|
|
|
318
|
-
return this.transport.request(request, options, callback)
|
|
319
|
-
}
|
|
408
|
+
return this.transport.request(request, options, callback);
|
|
409
|
+
};
|
|
320
410
|
|
|
321
|
-
IndicesApi.prototype.deleteTemplate = function indicesDeleteTemplateApi
|
|
322
|
-
|
|
411
|
+
IndicesApi.prototype.deleteTemplate = function indicesDeleteTemplateApi(params, options, callback) {
|
|
412
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
323
413
|
|
|
324
414
|
// check required parameters
|
|
325
415
|
if (params.name == null) {
|
|
326
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
327
|
-
return handleError(err, callback)
|
|
416
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
417
|
+
return handleError(err, callback);
|
|
328
418
|
}
|
|
329
419
|
|
|
330
|
-
let { method, body, name, ...querystring } = params
|
|
331
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
420
|
+
let { method, body, name, ...querystring } = params;
|
|
421
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
332
422
|
|
|
333
|
-
let path = ''
|
|
334
|
-
if (method == null) method = 'DELETE'
|
|
335
|
-
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
423
|
+
let path = '';
|
|
424
|
+
if (method == null) method = 'DELETE';
|
|
425
|
+
path = '/' + '_template' + '/' + encodeURIComponent(name);
|
|
336
426
|
|
|
337
427
|
// build request object
|
|
338
428
|
const request = {
|
|
339
429
|
method,
|
|
340
430
|
path,
|
|
341
431
|
body: body || '',
|
|
342
|
-
querystring
|
|
343
|
-
}
|
|
432
|
+
querystring,
|
|
433
|
+
};
|
|
344
434
|
|
|
345
|
-
return this.transport.request(request, options, callback)
|
|
346
|
-
}
|
|
435
|
+
return this.transport.request(request, options, callback);
|
|
436
|
+
};
|
|
347
437
|
|
|
348
|
-
IndicesApi.prototype.diskUsage = function indicesDiskUsageApi
|
|
349
|
-
|
|
438
|
+
IndicesApi.prototype.diskUsage = function indicesDiskUsageApi(params, options, callback) {
|
|
439
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
350
440
|
|
|
351
441
|
// check required parameters
|
|
352
442
|
if (params.index == null) {
|
|
353
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
354
|
-
return handleError(err, callback)
|
|
443
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
444
|
+
return handleError(err, callback);
|
|
355
445
|
}
|
|
356
446
|
|
|
357
|
-
let { method, body, index, ...querystring } = params
|
|
358
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
447
|
+
let { method, body, index, ...querystring } = params;
|
|
448
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
359
449
|
|
|
360
|
-
let path = ''
|
|
361
|
-
if (method == null) method = 'POST'
|
|
362
|
-
path = '/' + encodeURIComponent(index) + '/' + '_disk_usage'
|
|
450
|
+
let path = '';
|
|
451
|
+
if (method == null) method = 'POST';
|
|
452
|
+
path = '/' + encodeURIComponent(index) + '/' + '_disk_usage';
|
|
363
453
|
|
|
364
454
|
// build request object
|
|
365
455
|
const request = {
|
|
366
456
|
method,
|
|
367
457
|
path,
|
|
368
458
|
body: body || '',
|
|
369
|
-
querystring
|
|
370
|
-
}
|
|
459
|
+
querystring,
|
|
460
|
+
};
|
|
371
461
|
|
|
372
|
-
return this.transport.request(request, options, callback)
|
|
373
|
-
}
|
|
462
|
+
return this.transport.request(request, options, callback);
|
|
463
|
+
};
|
|
374
464
|
|
|
375
|
-
IndicesApi.prototype.exists = function indicesExistsApi
|
|
376
|
-
|
|
465
|
+
IndicesApi.prototype.exists = function indicesExistsApi(params, options, callback) {
|
|
466
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
377
467
|
|
|
378
468
|
// check required parameters
|
|
379
469
|
if (params.index == null) {
|
|
380
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
381
|
-
return handleError(err, callback)
|
|
470
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
471
|
+
return handleError(err, callback);
|
|
382
472
|
}
|
|
383
473
|
|
|
384
|
-
let { method, body, index, ...querystring } = params
|
|
385
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
474
|
+
let { method, body, index, ...querystring } = params;
|
|
475
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
386
476
|
|
|
387
|
-
let path = ''
|
|
388
|
-
if (method == null) method = 'HEAD'
|
|
389
|
-
path = '/' + encodeURIComponent(index)
|
|
477
|
+
let path = '';
|
|
478
|
+
if (method == null) method = 'HEAD';
|
|
479
|
+
path = '/' + encodeURIComponent(index);
|
|
390
480
|
|
|
391
481
|
// build request object
|
|
392
482
|
const request = {
|
|
393
483
|
method,
|
|
394
484
|
path,
|
|
395
485
|
body: null,
|
|
396
|
-
querystring
|
|
397
|
-
}
|
|
486
|
+
querystring,
|
|
487
|
+
};
|
|
398
488
|
|
|
399
|
-
return this.transport.request(request, options, callback)
|
|
400
|
-
}
|
|
489
|
+
return this.transport.request(request, options, callback);
|
|
490
|
+
};
|
|
401
491
|
|
|
402
|
-
IndicesApi.prototype.existsAlias = function indicesExistsAliasApi
|
|
403
|
-
|
|
492
|
+
IndicesApi.prototype.existsAlias = function indicesExistsAliasApi(params, options, callback) {
|
|
493
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
404
494
|
|
|
405
495
|
// check required parameters
|
|
406
496
|
if (params.name == null) {
|
|
407
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
408
|
-
return handleError(err, callback)
|
|
497
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
498
|
+
return handleError(err, callback);
|
|
409
499
|
}
|
|
410
500
|
|
|
411
|
-
let { method, body, name, index, ...querystring } = params
|
|
412
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
501
|
+
let { method, body, name, index, ...querystring } = params;
|
|
502
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
413
503
|
|
|
414
|
-
let path = ''
|
|
415
|
-
if (
|
|
416
|
-
if (method == null) method = 'HEAD'
|
|
417
|
-
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
504
|
+
let path = '';
|
|
505
|
+
if (index != null && name != null) {
|
|
506
|
+
if (method == null) method = 'HEAD';
|
|
507
|
+
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name);
|
|
418
508
|
} else {
|
|
419
|
-
if (method == null) method = 'HEAD'
|
|
420
|
-
path = '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
509
|
+
if (method == null) method = 'HEAD';
|
|
510
|
+
path = '/' + '_alias' + '/' + encodeURIComponent(name);
|
|
421
511
|
}
|
|
422
512
|
|
|
423
513
|
// build request object
|
|
@@ -425,143 +515,114 @@ IndicesApi.prototype.existsAlias = function indicesExistsAliasApi (params, optio
|
|
|
425
515
|
method,
|
|
426
516
|
path,
|
|
427
517
|
body: null,
|
|
428
|
-
querystring
|
|
429
|
-
}
|
|
518
|
+
querystring,
|
|
519
|
+
};
|
|
430
520
|
|
|
431
|
-
return this.transport.request(request, options, callback)
|
|
432
|
-
}
|
|
521
|
+
return this.transport.request(request, options, callback);
|
|
522
|
+
};
|
|
433
523
|
|
|
434
|
-
IndicesApi.prototype.existsIndexTemplate = function indicesExistsIndexTemplateApi
|
|
435
|
-
|
|
524
|
+
IndicesApi.prototype.existsIndexTemplate = function indicesExistsIndexTemplateApi(
|
|
525
|
+
params,
|
|
526
|
+
options,
|
|
527
|
+
callback
|
|
528
|
+
) {
|
|
529
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
436
530
|
|
|
437
531
|
// check required parameters
|
|
438
532
|
if (params.name == null) {
|
|
439
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
440
|
-
return handleError(err, callback)
|
|
533
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
534
|
+
return handleError(err, callback);
|
|
441
535
|
}
|
|
442
536
|
|
|
443
|
-
let { method, body, name, ...querystring } = params
|
|
444
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
537
|
+
let { method, body, name, ...querystring } = params;
|
|
538
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
445
539
|
|
|
446
|
-
let path = ''
|
|
447
|
-
if (method == null) method = 'HEAD'
|
|
448
|
-
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
540
|
+
let path = '';
|
|
541
|
+
if (method == null) method = 'HEAD';
|
|
542
|
+
path = '/' + '_index_template' + '/' + encodeURIComponent(name);
|
|
449
543
|
|
|
450
544
|
// build request object
|
|
451
545
|
const request = {
|
|
452
546
|
method,
|
|
453
547
|
path,
|
|
454
548
|
body: null,
|
|
455
|
-
querystring
|
|
456
|
-
}
|
|
549
|
+
querystring,
|
|
550
|
+
};
|
|
457
551
|
|
|
458
|
-
return this.transport.request(request, options, callback)
|
|
459
|
-
}
|
|
552
|
+
return this.transport.request(request, options, callback);
|
|
553
|
+
};
|
|
460
554
|
|
|
461
|
-
IndicesApi.prototype.existsTemplate = function indicesExistsTemplateApi
|
|
462
|
-
|
|
555
|
+
IndicesApi.prototype.existsTemplate = function indicesExistsTemplateApi(params, options, callback) {
|
|
556
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
463
557
|
|
|
464
558
|
// check required parameters
|
|
465
559
|
if (params.name == null) {
|
|
466
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
467
|
-
return handleError(err, callback)
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
let { method, body, name, ...querystring } = params
|
|
471
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
472
|
-
|
|
473
|
-
let path = ''
|
|
474
|
-
if (method == null) method = 'HEAD'
|
|
475
|
-
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
476
|
-
|
|
477
|
-
// build request object
|
|
478
|
-
const request = {
|
|
479
|
-
method,
|
|
480
|
-
path,
|
|
481
|
-
body: null,
|
|
482
|
-
querystring
|
|
560
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
561
|
+
return handleError(err, callback);
|
|
483
562
|
}
|
|
484
563
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
IndicesApi.prototype.existsType = function indicesExistsTypeApi (params, options, callback) {
|
|
489
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
490
|
-
|
|
491
|
-
// check required parameters
|
|
492
|
-
if (params.index == null) {
|
|
493
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
494
|
-
return handleError(err, callback)
|
|
495
|
-
}
|
|
496
|
-
if (params.type == null) {
|
|
497
|
-
const err = new this[kConfigurationError]('Missing required parameter: type')
|
|
498
|
-
return handleError(err, callback)
|
|
499
|
-
}
|
|
564
|
+
let { method, body, name, ...querystring } = params;
|
|
565
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
500
566
|
|
|
501
|
-
|
|
502
|
-
if (
|
|
503
|
-
|
|
504
|
-
return handleError(err, callback)
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
let { method, body, index, type, ...querystring } = params
|
|
508
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
509
|
-
|
|
510
|
-
let path = ''
|
|
511
|
-
if (method == null) method = 'HEAD'
|
|
512
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
567
|
+
let path = '';
|
|
568
|
+
if (method == null) method = 'HEAD';
|
|
569
|
+
path = '/' + '_template' + '/' + encodeURIComponent(name);
|
|
513
570
|
|
|
514
571
|
// build request object
|
|
515
572
|
const request = {
|
|
516
573
|
method,
|
|
517
574
|
path,
|
|
518
575
|
body: null,
|
|
519
|
-
querystring
|
|
520
|
-
}
|
|
576
|
+
querystring,
|
|
577
|
+
};
|
|
521
578
|
|
|
522
|
-
return this.transport.request(request, options, callback)
|
|
523
|
-
}
|
|
579
|
+
return this.transport.request(request, options, callback);
|
|
580
|
+
};
|
|
524
581
|
|
|
525
|
-
IndicesApi.prototype.fieldUsageStats = function indicesFieldUsageStatsApi
|
|
526
|
-
|
|
582
|
+
IndicesApi.prototype.fieldUsageStats = function indicesFieldUsageStatsApi(
|
|
583
|
+
params,
|
|
584
|
+
options,
|
|
585
|
+
callback
|
|
586
|
+
) {
|
|
587
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
527
588
|
|
|
528
589
|
// check required parameters
|
|
529
590
|
if (params.index == null) {
|
|
530
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
531
|
-
return handleError(err, callback)
|
|
591
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
592
|
+
return handleError(err, callback);
|
|
532
593
|
}
|
|
533
594
|
|
|
534
|
-
let { method, body, index, ...querystring } = params
|
|
535
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
595
|
+
let { method, body, index, ...querystring } = params;
|
|
596
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
536
597
|
|
|
537
|
-
let path = ''
|
|
538
|
-
if (method == null) method = 'GET'
|
|
539
|
-
path = '/' + encodeURIComponent(index) + '/' + '_field_usage_stats'
|
|
598
|
+
let path = '';
|
|
599
|
+
if (method == null) method = 'GET';
|
|
600
|
+
path = '/' + encodeURIComponent(index) + '/' + '_field_usage_stats';
|
|
540
601
|
|
|
541
602
|
// build request object
|
|
542
603
|
const request = {
|
|
543
604
|
method,
|
|
544
605
|
path,
|
|
545
606
|
body: null,
|
|
546
|
-
querystring
|
|
547
|
-
}
|
|
607
|
+
querystring,
|
|
608
|
+
};
|
|
548
609
|
|
|
549
|
-
return this.transport.request(request, options, callback)
|
|
550
|
-
}
|
|
610
|
+
return this.transport.request(request, options, callback);
|
|
611
|
+
};
|
|
551
612
|
|
|
552
|
-
IndicesApi.prototype.flush = function indicesFlushApi
|
|
553
|
-
|
|
613
|
+
IndicesApi.prototype.flush = function indicesFlushApi(params, options, callback) {
|
|
614
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
554
615
|
|
|
555
|
-
let { method, body, index, ...querystring } = params
|
|
556
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
616
|
+
let { method, body, index, ...querystring } = params;
|
|
617
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
557
618
|
|
|
558
|
-
let path = ''
|
|
559
|
-
if (
|
|
560
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
561
|
-
path = '/' + encodeURIComponent(index) + '/' + '_flush'
|
|
619
|
+
let path = '';
|
|
620
|
+
if (index != null) {
|
|
621
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
622
|
+
path = '/' + encodeURIComponent(index) + '/' + '_flush';
|
|
562
623
|
} else {
|
|
563
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
564
|
-
path = '/' + '_flush'
|
|
624
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
625
|
+
path = '/' + '_flush';
|
|
565
626
|
}
|
|
566
627
|
|
|
567
628
|
// build request object
|
|
@@ -569,46 +630,25 @@ IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback
|
|
|
569
630
|
method,
|
|
570
631
|
path,
|
|
571
632
|
body: body || '',
|
|
572
|
-
querystring
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
return this.transport.request(request, options, callback)
|
|
576
|
-
}
|
|
633
|
+
querystring,
|
|
634
|
+
};
|
|
577
635
|
|
|
578
|
-
|
|
579
|
-
|
|
636
|
+
return this.transport.request(request, options, callback);
|
|
637
|
+
};
|
|
580
638
|
|
|
581
|
-
|
|
582
|
-
|
|
639
|
+
IndicesApi.prototype.forcemerge = function indicesForcemergeApi(params, options, callback) {
|
|
640
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
583
641
|
|
|
584
|
-
let
|
|
585
|
-
|
|
586
|
-
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
|
642
|
+
let { method, body, index, ...querystring } = params;
|
|
643
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
587
644
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
method
|
|
591
|
-
path
|
|
592
|
-
body: body || '',
|
|
593
|
-
querystring
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
return this.transport.request(request, options, callback)
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options, callback) {
|
|
600
|
-
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
601
|
-
|
|
602
|
-
let { method, body, index, ...querystring } = params
|
|
603
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
604
|
-
|
|
605
|
-
let path = ''
|
|
606
|
-
if ((index) != null) {
|
|
607
|
-
if (method == null) method = 'POST'
|
|
608
|
-
path = '/' + encodeURIComponent(index) + '/' + '_forcemerge'
|
|
645
|
+
let path = '';
|
|
646
|
+
if (index != null) {
|
|
647
|
+
if (method == null) method = 'POST';
|
|
648
|
+
path = '/' + encodeURIComponent(index) + '/' + '_forcemerge';
|
|
609
649
|
} else {
|
|
610
|
-
if (method == null) method = 'POST'
|
|
611
|
-
path = '/' + '_forcemerge'
|
|
650
|
+
if (method == null) method = 'POST';
|
|
651
|
+
path = '/' + '_forcemerge';
|
|
612
652
|
}
|
|
613
653
|
|
|
614
654
|
// build request object
|
|
@@ -616,58 +656,58 @@ IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options
|
|
|
616
656
|
method,
|
|
617
657
|
path,
|
|
618
658
|
body: body || '',
|
|
619
|
-
querystring
|
|
620
|
-
}
|
|
659
|
+
querystring,
|
|
660
|
+
};
|
|
621
661
|
|
|
622
|
-
return this.transport.request(request, options, callback)
|
|
623
|
-
}
|
|
662
|
+
return this.transport.request(request, options, callback);
|
|
663
|
+
};
|
|
624
664
|
|
|
625
|
-
IndicesApi.prototype.get = function indicesGetApi
|
|
626
|
-
|
|
665
|
+
IndicesApi.prototype.get = function indicesGetApi(params, options, callback) {
|
|
666
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
627
667
|
|
|
628
668
|
// check required parameters
|
|
629
669
|
if (params.index == null) {
|
|
630
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
631
|
-
return handleError(err, callback)
|
|
670
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
671
|
+
return handleError(err, callback);
|
|
632
672
|
}
|
|
633
673
|
|
|
634
|
-
let { method, body, index, ...querystring } = params
|
|
635
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
674
|
+
let { method, body, index, ...querystring } = params;
|
|
675
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
636
676
|
|
|
637
|
-
let path = ''
|
|
638
|
-
if (method == null) method = 'GET'
|
|
639
|
-
path = '/' + encodeURIComponent(index)
|
|
677
|
+
let path = '';
|
|
678
|
+
if (method == null) method = 'GET';
|
|
679
|
+
path = '/' + encodeURIComponent(index);
|
|
640
680
|
|
|
641
681
|
// build request object
|
|
642
682
|
const request = {
|
|
643
683
|
method,
|
|
644
684
|
path,
|
|
645
685
|
body: null,
|
|
646
|
-
querystring
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
return this.transport.request(request, options, callback)
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
IndicesApi.prototype.getAlias = function indicesGetAliasApi
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
let { method, body, name, index, ...querystring } = params
|
|
656
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
657
|
-
|
|
658
|
-
let path = ''
|
|
659
|
-
if (
|
|
660
|
-
if (method == null) method = 'GET'
|
|
661
|
-
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
662
|
-
} else if (
|
|
663
|
-
if (method == null) method = 'GET'
|
|
664
|
-
path = '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
665
|
-
} else if (
|
|
666
|
-
if (method == null) method = 'GET'
|
|
667
|
-
path = '/' + encodeURIComponent(index) + '/' + '_alias'
|
|
686
|
+
querystring,
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
return this.transport.request(request, options, callback);
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
IndicesApi.prototype.getAlias = function indicesGetAliasApi(params, options, callback) {
|
|
693
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
694
|
+
|
|
695
|
+
let { method, body, name, index, ...querystring } = params;
|
|
696
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
697
|
+
|
|
698
|
+
let path = '';
|
|
699
|
+
if (index != null && name != null) {
|
|
700
|
+
if (method == null) method = 'GET';
|
|
701
|
+
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name);
|
|
702
|
+
} else if (name != null) {
|
|
703
|
+
if (method == null) method = 'GET';
|
|
704
|
+
path = '/' + '_alias' + '/' + encodeURIComponent(name);
|
|
705
|
+
} else if (index != null) {
|
|
706
|
+
if (method == null) method = 'GET';
|
|
707
|
+
path = '/' + encodeURIComponent(index) + '/' + '_alias';
|
|
668
708
|
} else {
|
|
669
|
-
if (method == null) method = 'GET'
|
|
670
|
-
path = '/' + '_alias'
|
|
709
|
+
if (method == null) method = 'GET';
|
|
710
|
+
path = '/' + '_alias';
|
|
671
711
|
}
|
|
672
712
|
|
|
673
713
|
// build request object
|
|
@@ -675,37 +715,67 @@ IndicesApi.prototype.getAlias = function indicesGetAliasApi (params, options, ca
|
|
|
675
715
|
method,
|
|
676
716
|
path,
|
|
677
717
|
body: null,
|
|
678
|
-
querystring
|
|
679
|
-
}
|
|
718
|
+
querystring,
|
|
719
|
+
};
|
|
680
720
|
|
|
681
|
-
return this.transport.request(request, options, callback)
|
|
682
|
-
}
|
|
721
|
+
return this.transport.request(request, options, callback);
|
|
722
|
+
};
|
|
683
723
|
|
|
684
|
-
IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi
|
|
685
|
-
|
|
724
|
+
IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi(
|
|
725
|
+
params,
|
|
726
|
+
options,
|
|
727
|
+
callback
|
|
728
|
+
) {
|
|
729
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
686
730
|
|
|
687
731
|
// check required parameters
|
|
688
732
|
if (params.fields == null) {
|
|
689
|
-
const err = new this[kConfigurationError]('Missing required parameter: fields')
|
|
690
|
-
return handleError(err, callback)
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
let { method, body, fields, index, type, ...querystring } = params
|
|
694
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
695
|
-
|
|
696
|
-
let path = ''
|
|
697
|
-
if (
|
|
698
|
-
if (method == null) method = 'GET'
|
|
699
|
-
path =
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
733
|
+
const err = new this[kConfigurationError]('Missing required parameter: fields');
|
|
734
|
+
return handleError(err, callback);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
let { method, body, fields, index, type, ...querystring } = params;
|
|
738
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
739
|
+
|
|
740
|
+
let path = '';
|
|
741
|
+
if (index != null && type != null && fields != null) {
|
|
742
|
+
if (method == null) method = 'GET';
|
|
743
|
+
path =
|
|
744
|
+
'/' +
|
|
745
|
+
encodeURIComponent(index) +
|
|
746
|
+
'/' +
|
|
747
|
+
'_mapping' +
|
|
748
|
+
'/' +
|
|
749
|
+
encodeURIComponent(type) +
|
|
750
|
+
'/' +
|
|
751
|
+
'field' +
|
|
752
|
+
'/' +
|
|
753
|
+
encodeURIComponent(fields);
|
|
754
|
+
} else if (index != null && fields != null) {
|
|
755
|
+
if (method == null) method = 'GET';
|
|
756
|
+
path =
|
|
757
|
+
'/' +
|
|
758
|
+
encodeURIComponent(index) +
|
|
759
|
+
'/' +
|
|
760
|
+
'_mapping' +
|
|
761
|
+
'/' +
|
|
762
|
+
'field' +
|
|
763
|
+
'/' +
|
|
764
|
+
encodeURIComponent(fields);
|
|
765
|
+
} else if (type != null && fields != null) {
|
|
766
|
+
if (method == null) method = 'GET';
|
|
767
|
+
path =
|
|
768
|
+
'/' +
|
|
769
|
+
'_mapping' +
|
|
770
|
+
'/' +
|
|
771
|
+
encodeURIComponent(type) +
|
|
772
|
+
'/' +
|
|
773
|
+
'field' +
|
|
774
|
+
'/' +
|
|
775
|
+
encodeURIComponent(fields);
|
|
706
776
|
} else {
|
|
707
|
-
if (method == null) method = 'GET'
|
|
708
|
-
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
|
777
|
+
if (method == null) method = 'GET';
|
|
778
|
+
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields);
|
|
709
779
|
}
|
|
710
780
|
|
|
711
781
|
// build request object
|
|
@@ -713,25 +783,29 @@ IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (param
|
|
|
713
783
|
method,
|
|
714
784
|
path,
|
|
715
785
|
body: null,
|
|
716
|
-
querystring
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
return this.transport.request(request, options, callback)
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
786
|
+
querystring,
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
return this.transport.request(request, options, callback);
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi(
|
|
793
|
+
params,
|
|
794
|
+
options,
|
|
795
|
+
callback
|
|
796
|
+
) {
|
|
797
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
798
|
+
|
|
799
|
+
let { method, body, name, ...querystring } = params;
|
|
800
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
801
|
+
|
|
802
|
+
let path = '';
|
|
803
|
+
if (name != null) {
|
|
804
|
+
if (method == null) method = 'GET';
|
|
805
|
+
path = '/' + '_index_template' + '/' + encodeURIComponent(name);
|
|
732
806
|
} else {
|
|
733
|
-
if (method == null) method = 'GET'
|
|
734
|
-
path = '/' + '_index_template'
|
|
807
|
+
if (method == null) method = 'GET';
|
|
808
|
+
path = '/' + '_index_template';
|
|
735
809
|
}
|
|
736
810
|
|
|
737
811
|
// build request object
|
|
@@ -739,31 +813,31 @@ IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi (par
|
|
|
739
813
|
method,
|
|
740
814
|
path,
|
|
741
815
|
body: null,
|
|
742
|
-
querystring
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
return this.transport.request(request, options, callback)
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
IndicesApi.prototype.getMapping = function indicesGetMappingApi
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
let { method, body, index, type, ...querystring } = params
|
|
752
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
753
|
-
|
|
754
|
-
let path = ''
|
|
755
|
-
if (
|
|
756
|
-
if (method == null) method = 'GET'
|
|
757
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
758
|
-
} else if (
|
|
759
|
-
if (method == null) method = 'GET'
|
|
760
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
|
761
|
-
} else if (
|
|
762
|
-
if (method == null) method = 'GET'
|
|
763
|
-
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
816
|
+
querystring,
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
return this.transport.request(request, options, callback);
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
IndicesApi.prototype.getMapping = function indicesGetMappingApi(params, options, callback) {
|
|
823
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
824
|
+
|
|
825
|
+
let { method, body, index, type, ...querystring } = params;
|
|
826
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
827
|
+
|
|
828
|
+
let path = '';
|
|
829
|
+
if (index != null && type != null) {
|
|
830
|
+
if (method == null) method = 'GET';
|
|
831
|
+
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type);
|
|
832
|
+
} else if (index != null) {
|
|
833
|
+
if (method == null) method = 'GET';
|
|
834
|
+
path = '/' + encodeURIComponent(index) + '/' + '_mapping';
|
|
835
|
+
} else if (type != null) {
|
|
836
|
+
if (method == null) method = 'GET';
|
|
837
|
+
path = '/' + '_mapping' + '/' + encodeURIComponent(type);
|
|
764
838
|
} else {
|
|
765
|
-
if (method == null) method = 'GET'
|
|
766
|
-
path = '/' + '_mapping'
|
|
839
|
+
if (method == null) method = 'GET';
|
|
840
|
+
path = '/' + '_mapping';
|
|
767
841
|
}
|
|
768
842
|
|
|
769
843
|
// build request object
|
|
@@ -771,31 +845,31 @@ IndicesApi.prototype.getMapping = function indicesGetMappingApi (params, options
|
|
|
771
845
|
method,
|
|
772
846
|
path,
|
|
773
847
|
body: null,
|
|
774
|
-
querystring
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
return this.transport.request(request, options, callback)
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
IndicesApi.prototype.getSettings = function indicesGetSettingsApi
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
let { method, body, index, name, ...querystring } = params
|
|
784
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
785
|
-
|
|
786
|
-
let path = ''
|
|
787
|
-
if (
|
|
788
|
-
if (method == null) method = 'GET'
|
|
789
|
-
path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name)
|
|
790
|
-
} else if (
|
|
791
|
-
if (method == null) method = 'GET'
|
|
792
|
-
path = '/' + encodeURIComponent(index) + '/' + '_settings'
|
|
793
|
-
} else if (
|
|
794
|
-
if (method == null) method = 'GET'
|
|
795
|
-
path = '/' + '_settings' + '/' + encodeURIComponent(name)
|
|
848
|
+
querystring,
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
return this.transport.request(request, options, callback);
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
IndicesApi.prototype.getSettings = function indicesGetSettingsApi(params, options, callback) {
|
|
855
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
856
|
+
|
|
857
|
+
let { method, body, index, name, ...querystring } = params;
|
|
858
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
859
|
+
|
|
860
|
+
let path = '';
|
|
861
|
+
if (index != null && name != null) {
|
|
862
|
+
if (method == null) method = 'GET';
|
|
863
|
+
path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name);
|
|
864
|
+
} else if (index != null) {
|
|
865
|
+
if (method == null) method = 'GET';
|
|
866
|
+
path = '/' + encodeURIComponent(index) + '/' + '_settings';
|
|
867
|
+
} else if (name != null) {
|
|
868
|
+
if (method == null) method = 'GET';
|
|
869
|
+
path = '/' + '_settings' + '/' + encodeURIComponent(name);
|
|
796
870
|
} else {
|
|
797
|
-
if (method == null) method = 'GET'
|
|
798
|
-
path = '/' + '_settings'
|
|
871
|
+
if (method == null) method = 'GET';
|
|
872
|
+
path = '/' + '_settings';
|
|
799
873
|
}
|
|
800
874
|
|
|
801
875
|
// build request object
|
|
@@ -803,25 +877,25 @@ IndicesApi.prototype.getSettings = function indicesGetSettingsApi (params, optio
|
|
|
803
877
|
method,
|
|
804
878
|
path,
|
|
805
879
|
body: null,
|
|
806
|
-
querystring
|
|
807
|
-
}
|
|
880
|
+
querystring,
|
|
881
|
+
};
|
|
808
882
|
|
|
809
|
-
return this.transport.request(request, options, callback)
|
|
810
|
-
}
|
|
883
|
+
return this.transport.request(request, options, callback);
|
|
884
|
+
};
|
|
811
885
|
|
|
812
|
-
IndicesApi.prototype.getTemplate = function indicesGetTemplateApi
|
|
813
|
-
|
|
886
|
+
IndicesApi.prototype.getTemplate = function indicesGetTemplateApi(params, options, callback) {
|
|
887
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
814
888
|
|
|
815
|
-
let { method, body, name, ...querystring } = params
|
|
816
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
889
|
+
let { method, body, name, ...querystring } = params;
|
|
890
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
817
891
|
|
|
818
|
-
let path = ''
|
|
819
|
-
if (
|
|
820
|
-
if (method == null) method = 'GET'
|
|
821
|
-
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
892
|
+
let path = '';
|
|
893
|
+
if (name != null) {
|
|
894
|
+
if (method == null) method = 'GET';
|
|
895
|
+
path = '/' + '_template' + '/' + encodeURIComponent(name);
|
|
822
896
|
} else {
|
|
823
|
-
if (method == null) method = 'GET'
|
|
824
|
-
path = '/' + '_template'
|
|
897
|
+
if (method == null) method = 'GET';
|
|
898
|
+
path = '/' + '_template';
|
|
825
899
|
}
|
|
826
900
|
|
|
827
901
|
// build request object
|
|
@@ -829,89 +903,89 @@ IndicesApi.prototype.getTemplate = function indicesGetTemplateApi (params, optio
|
|
|
829
903
|
method,
|
|
830
904
|
path,
|
|
831
905
|
body: null,
|
|
832
|
-
querystring
|
|
833
|
-
}
|
|
906
|
+
querystring,
|
|
907
|
+
};
|
|
834
908
|
|
|
835
|
-
return this.transport.request(request, options, callback)
|
|
836
|
-
}
|
|
909
|
+
return this.transport.request(request, options, callback);
|
|
910
|
+
};
|
|
837
911
|
|
|
838
|
-
IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi
|
|
839
|
-
|
|
912
|
+
IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi(params, options, callback) {
|
|
913
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
840
914
|
|
|
841
|
-
let { method, body, index, ...querystring } = params
|
|
842
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
915
|
+
let { method, body, index, ...querystring } = params;
|
|
916
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
843
917
|
|
|
844
|
-
let path = ''
|
|
845
|
-
if (method == null) method = 'GET'
|
|
846
|
-
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
|
918
|
+
let path = '';
|
|
919
|
+
if (method == null) method = 'GET';
|
|
920
|
+
path = '/' + encodeURIComponent(index) + '/' + '_upgrade';
|
|
847
921
|
|
|
848
922
|
// build request object
|
|
849
923
|
const request = {
|
|
850
924
|
method,
|
|
851
925
|
path,
|
|
852
926
|
body: null,
|
|
853
|
-
querystring
|
|
854
|
-
}
|
|
927
|
+
querystring,
|
|
928
|
+
};
|
|
855
929
|
|
|
856
|
-
return this.transport.request(request, options, callback)
|
|
857
|
-
}
|
|
930
|
+
return this.transport.request(request, options, callback);
|
|
931
|
+
};
|
|
858
932
|
|
|
859
|
-
IndicesApi.prototype.open = function indicesOpenApi
|
|
860
|
-
|
|
933
|
+
IndicesApi.prototype.open = function indicesOpenApi(params, options, callback) {
|
|
934
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
861
935
|
|
|
862
936
|
// check required parameters
|
|
863
937
|
if (params.index == null) {
|
|
864
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
865
|
-
return handleError(err, callback)
|
|
938
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
939
|
+
return handleError(err, callback);
|
|
866
940
|
}
|
|
867
941
|
|
|
868
|
-
let { method, body, index, ...querystring } = params
|
|
869
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
942
|
+
let { method, body, index, ...querystring } = params;
|
|
943
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
870
944
|
|
|
871
|
-
let path = ''
|
|
872
|
-
if (method == null) method = 'POST'
|
|
873
|
-
path = '/' + encodeURIComponent(index) + '/' + '_open'
|
|
945
|
+
let path = '';
|
|
946
|
+
if (method == null) method = 'POST';
|
|
947
|
+
path = '/' + encodeURIComponent(index) + '/' + '_open';
|
|
874
948
|
|
|
875
949
|
// build request object
|
|
876
950
|
const request = {
|
|
877
951
|
method,
|
|
878
952
|
path,
|
|
879
953
|
body: body || '',
|
|
880
|
-
querystring
|
|
881
|
-
}
|
|
954
|
+
querystring,
|
|
955
|
+
};
|
|
882
956
|
|
|
883
|
-
return this.transport.request(request, options, callback)
|
|
884
|
-
}
|
|
957
|
+
return this.transport.request(request, options, callback);
|
|
958
|
+
};
|
|
885
959
|
|
|
886
|
-
IndicesApi.prototype.putAlias = function indicesPutAliasApi
|
|
887
|
-
|
|
960
|
+
IndicesApi.prototype.putAlias = function indicesPutAliasApi(params, options, callback) {
|
|
961
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
888
962
|
|
|
889
963
|
// check required parameters
|
|
890
964
|
if (params.index == null) {
|
|
891
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
892
|
-
return handleError(err, callback)
|
|
965
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
966
|
+
return handleError(err, callback);
|
|
893
967
|
}
|
|
894
968
|
if (params.name == null) {
|
|
895
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
896
|
-
return handleError(err, callback)
|
|
969
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
970
|
+
return handleError(err, callback);
|
|
897
971
|
}
|
|
898
972
|
|
|
899
973
|
// check required url components
|
|
900
|
-
if (params.name != null &&
|
|
901
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
902
|
-
return handleError(err, callback)
|
|
974
|
+
if (params.name != null && params.index == null) {
|
|
975
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
976
|
+
return handleError(err, callback);
|
|
903
977
|
}
|
|
904
978
|
|
|
905
|
-
let { method, body, index, name, ...querystring } = params
|
|
906
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
979
|
+
let { method, body, index, name, ...querystring } = params;
|
|
980
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
907
981
|
|
|
908
|
-
let path = ''
|
|
909
|
-
if (
|
|
910
|
-
if (method == null) method = 'PUT'
|
|
911
|
-
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
|
982
|
+
let path = '';
|
|
983
|
+
if (index != null && name != null) {
|
|
984
|
+
if (method == null) method = 'PUT';
|
|
985
|
+
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name);
|
|
912
986
|
} else {
|
|
913
|
-
if (method == null) method = 'PUT'
|
|
914
|
-
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
|
987
|
+
if (method == null) method = 'PUT';
|
|
988
|
+
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name);
|
|
915
989
|
}
|
|
916
990
|
|
|
917
991
|
// build request object
|
|
@@ -919,80 +993,84 @@ IndicesApi.prototype.putAlias = function indicesPutAliasApi (params, options, ca
|
|
|
919
993
|
method,
|
|
920
994
|
path,
|
|
921
995
|
body: body || '',
|
|
922
|
-
querystring
|
|
923
|
-
}
|
|
996
|
+
querystring,
|
|
997
|
+
};
|
|
924
998
|
|
|
925
|
-
return this.transport.request(request, options, callback)
|
|
926
|
-
}
|
|
999
|
+
return this.transport.request(request, options, callback);
|
|
1000
|
+
};
|
|
927
1001
|
|
|
928
|
-
IndicesApi.prototype.putIndexTemplate = function indicesPutIndexTemplateApi
|
|
929
|
-
|
|
1002
|
+
IndicesApi.prototype.putIndexTemplate = function indicesPutIndexTemplateApi(
|
|
1003
|
+
params,
|
|
1004
|
+
options,
|
|
1005
|
+
callback
|
|
1006
|
+
) {
|
|
1007
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
930
1008
|
|
|
931
1009
|
// check required parameters
|
|
932
1010
|
if (params.name == null) {
|
|
933
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
934
|
-
return handleError(err, callback)
|
|
1011
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
1012
|
+
return handleError(err, callback);
|
|
935
1013
|
}
|
|
936
1014
|
if (params.body == null) {
|
|
937
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
938
|
-
return handleError(err, callback)
|
|
1015
|
+
const err = new this[kConfigurationError]('Missing required parameter: body');
|
|
1016
|
+
return handleError(err, callback);
|
|
939
1017
|
}
|
|
940
1018
|
|
|
941
|
-
let { method, body, name, ...querystring } = params
|
|
942
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1019
|
+
let { method, body, name, ...querystring } = params;
|
|
1020
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
943
1021
|
|
|
944
|
-
let path = ''
|
|
945
|
-
if (method == null) method = 'PUT'
|
|
946
|
-
path = '/' + '_index_template' + '/' + encodeURIComponent(name)
|
|
1022
|
+
let path = '';
|
|
1023
|
+
if (method == null) method = 'PUT';
|
|
1024
|
+
path = '/' + '_index_template' + '/' + encodeURIComponent(name);
|
|
947
1025
|
|
|
948
1026
|
// build request object
|
|
949
1027
|
const request = {
|
|
950
1028
|
method,
|
|
951
1029
|
path,
|
|
952
1030
|
body: body || '',
|
|
953
|
-
querystring
|
|
954
|
-
}
|
|
1031
|
+
querystring,
|
|
1032
|
+
};
|
|
955
1033
|
|
|
956
|
-
return this.transport.request(request, options, callback)
|
|
957
|
-
}
|
|
1034
|
+
return this.transport.request(request, options, callback);
|
|
1035
|
+
};
|
|
958
1036
|
|
|
959
|
-
IndicesApi.prototype.putMapping = function indicesPutMappingApi
|
|
960
|
-
|
|
1037
|
+
IndicesApi.prototype.putMapping = function indicesPutMappingApi(params, options, callback) {
|
|
1038
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
961
1039
|
|
|
962
1040
|
// check required parameters
|
|
963
1041
|
if (params.body == null) {
|
|
964
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
965
|
-
return handleError(err, callback)
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
let { method, body, index, type, ...querystring } = params
|
|
969
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
970
|
-
|
|
971
|
-
let path = ''
|
|
972
|
-
if (
|
|
973
|
-
if (method == null) method = 'PUT'
|
|
974
|
-
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'
|
|
975
|
-
} else if (
|
|
976
|
-
if (method == null) method = 'PUT'
|
|
977
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
978
|
-
} else if (
|
|
979
|
-
if (method == null) method = 'PUT'
|
|
980
|
-
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings'
|
|
981
|
-
} else if (
|
|
982
|
-
if (method == null) method = 'PUT'
|
|
983
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type)
|
|
984
|
-
} else if (
|
|
985
|
-
if (method == null) method = 'PUT'
|
|
986
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
|
987
|
-
} else if (
|
|
988
|
-
if (method == null) method = 'PUT'
|
|
989
|
-
path = '/' + '_mappings' + '/' + encodeURIComponent(type)
|
|
990
|
-
} else if (
|
|
991
|
-
if (method == null) method = 'PUT'
|
|
992
|
-
path = '/' + encodeURIComponent(index) + '/' + '_mappings'
|
|
1042
|
+
const err = new this[kConfigurationError]('Missing required parameter: body');
|
|
1043
|
+
return handleError(err, callback);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
let { method, body, index, type, ...querystring } = params;
|
|
1047
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1048
|
+
|
|
1049
|
+
let path = '';
|
|
1050
|
+
if (index != null && type != null) {
|
|
1051
|
+
if (method == null) method = 'PUT';
|
|
1052
|
+
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping';
|
|
1053
|
+
} else if (index != null && type != null) {
|
|
1054
|
+
if (method == null) method = 'PUT';
|
|
1055
|
+
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type);
|
|
1056
|
+
} else if (index != null && type != null) {
|
|
1057
|
+
if (method == null) method = 'PUT';
|
|
1058
|
+
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings';
|
|
1059
|
+
} else if (index != null && type != null) {
|
|
1060
|
+
if (method == null) method = 'PUT';
|
|
1061
|
+
path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type);
|
|
1062
|
+
} else if (index != null) {
|
|
1063
|
+
if (method == null) method = 'PUT';
|
|
1064
|
+
path = '/' + encodeURIComponent(index) + '/' + '_mapping';
|
|
1065
|
+
} else if (type != null) {
|
|
1066
|
+
if (method == null) method = 'PUT';
|
|
1067
|
+
path = '/' + '_mappings' + '/' + encodeURIComponent(type);
|
|
1068
|
+
} else if (index != null) {
|
|
1069
|
+
if (method == null) method = 'PUT';
|
|
1070
|
+
path = '/' + encodeURIComponent(index) + '/' + '_mappings';
|
|
993
1071
|
} else {
|
|
994
|
-
if (method == null) method = 'PUT'
|
|
995
|
-
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
|
1072
|
+
if (method == null) method = 'PUT';
|
|
1073
|
+
path = '/' + '_mapping' + '/' + encodeURIComponent(type);
|
|
996
1074
|
}
|
|
997
1075
|
|
|
998
1076
|
// build request object
|
|
@@ -1000,31 +1078,31 @@ IndicesApi.prototype.putMapping = function indicesPutMappingApi (params, options
|
|
|
1000
1078
|
method,
|
|
1001
1079
|
path,
|
|
1002
1080
|
body: body || '',
|
|
1003
|
-
querystring
|
|
1004
|
-
}
|
|
1081
|
+
querystring,
|
|
1082
|
+
};
|
|
1005
1083
|
|
|
1006
|
-
return this.transport.request(request, options, callback)
|
|
1007
|
-
}
|
|
1084
|
+
return this.transport.request(request, options, callback);
|
|
1085
|
+
};
|
|
1008
1086
|
|
|
1009
|
-
IndicesApi.prototype.putSettings = function indicesPutSettingsApi
|
|
1010
|
-
|
|
1087
|
+
IndicesApi.prototype.putSettings = function indicesPutSettingsApi(params, options, callback) {
|
|
1088
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1011
1089
|
|
|
1012
1090
|
// check required parameters
|
|
1013
1091
|
if (params.body == null) {
|
|
1014
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1015
|
-
return handleError(err, callback)
|
|
1092
|
+
const err = new this[kConfigurationError]('Missing required parameter: body');
|
|
1093
|
+
return handleError(err, callback);
|
|
1016
1094
|
}
|
|
1017
1095
|
|
|
1018
|
-
let { method, body, index, ...querystring } = params
|
|
1019
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1096
|
+
let { method, body, index, ...querystring } = params;
|
|
1097
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1020
1098
|
|
|
1021
|
-
let path = ''
|
|
1022
|
-
if (
|
|
1023
|
-
if (method == null) method = 'PUT'
|
|
1024
|
-
path = '/' + encodeURIComponent(index) + '/' + '_settings'
|
|
1099
|
+
let path = '';
|
|
1100
|
+
if (index != null) {
|
|
1101
|
+
if (method == null) method = 'PUT';
|
|
1102
|
+
path = '/' + encodeURIComponent(index) + '/' + '_settings';
|
|
1025
1103
|
} else {
|
|
1026
|
-
if (method == null) method = 'PUT'
|
|
1027
|
-
path = '/' + '_settings'
|
|
1104
|
+
if (method == null) method = 'PUT';
|
|
1105
|
+
path = '/' + '_settings';
|
|
1028
1106
|
}
|
|
1029
1107
|
|
|
1030
1108
|
// build request object
|
|
@@ -1032,56 +1110,56 @@ IndicesApi.prototype.putSettings = function indicesPutSettingsApi (params, optio
|
|
|
1032
1110
|
method,
|
|
1033
1111
|
path,
|
|
1034
1112
|
body: body || '',
|
|
1035
|
-
querystring
|
|
1036
|
-
}
|
|
1113
|
+
querystring,
|
|
1114
|
+
};
|
|
1037
1115
|
|
|
1038
|
-
return this.transport.request(request, options, callback)
|
|
1039
|
-
}
|
|
1116
|
+
return this.transport.request(request, options, callback);
|
|
1117
|
+
};
|
|
1040
1118
|
|
|
1041
|
-
IndicesApi.prototype.putTemplate = function indicesPutTemplateApi
|
|
1042
|
-
|
|
1119
|
+
IndicesApi.prototype.putTemplate = function indicesPutTemplateApi(params, options, callback) {
|
|
1120
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1043
1121
|
|
|
1044
1122
|
// check required parameters
|
|
1045
1123
|
if (params.name == null) {
|
|
1046
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1047
|
-
return handleError(err, callback)
|
|
1124
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
1125
|
+
return handleError(err, callback);
|
|
1048
1126
|
}
|
|
1049
1127
|
if (params.body == null) {
|
|
1050
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1051
|
-
return handleError(err, callback)
|
|
1128
|
+
const err = new this[kConfigurationError]('Missing required parameter: body');
|
|
1129
|
+
return handleError(err, callback);
|
|
1052
1130
|
}
|
|
1053
1131
|
|
|
1054
|
-
let { method, body, name, ...querystring } = params
|
|
1055
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1132
|
+
let { method, body, name, ...querystring } = params;
|
|
1133
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1056
1134
|
|
|
1057
|
-
let path = ''
|
|
1058
|
-
if (method == null) method = 'PUT'
|
|
1059
|
-
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
|
1135
|
+
let path = '';
|
|
1136
|
+
if (method == null) method = 'PUT';
|
|
1137
|
+
path = '/' + '_template' + '/' + encodeURIComponent(name);
|
|
1060
1138
|
|
|
1061
1139
|
// build request object
|
|
1062
1140
|
const request = {
|
|
1063
1141
|
method,
|
|
1064
1142
|
path,
|
|
1065
1143
|
body: body || '',
|
|
1066
|
-
querystring
|
|
1067
|
-
}
|
|
1144
|
+
querystring,
|
|
1145
|
+
};
|
|
1068
1146
|
|
|
1069
|
-
return this.transport.request(request, options, callback)
|
|
1070
|
-
}
|
|
1147
|
+
return this.transport.request(request, options, callback);
|
|
1148
|
+
};
|
|
1071
1149
|
|
|
1072
|
-
IndicesApi.prototype.recovery = function indicesRecoveryApi
|
|
1073
|
-
|
|
1150
|
+
IndicesApi.prototype.recovery = function indicesRecoveryApi(params, options, callback) {
|
|
1151
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1074
1152
|
|
|
1075
|
-
let { method, body, index, ...querystring } = params
|
|
1076
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1153
|
+
let { method, body, index, ...querystring } = params;
|
|
1154
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1077
1155
|
|
|
1078
|
-
let path = ''
|
|
1079
|
-
if (
|
|
1080
|
-
if (method == null) method = 'GET'
|
|
1081
|
-
path = '/' + encodeURIComponent(index) + '/' + '_recovery'
|
|
1156
|
+
let path = '';
|
|
1157
|
+
if (index != null) {
|
|
1158
|
+
if (method == null) method = 'GET';
|
|
1159
|
+
path = '/' + encodeURIComponent(index) + '/' + '_recovery';
|
|
1082
1160
|
} else {
|
|
1083
|
-
if (method == null) method = 'GET'
|
|
1084
|
-
path = '/' + '_recovery'
|
|
1161
|
+
if (method == null) method = 'GET';
|
|
1162
|
+
path = '/' + '_recovery';
|
|
1085
1163
|
}
|
|
1086
1164
|
|
|
1087
1165
|
// build request object
|
|
@@ -1089,25 +1167,25 @@ IndicesApi.prototype.recovery = function indicesRecoveryApi (params, options, ca
|
|
|
1089
1167
|
method,
|
|
1090
1168
|
path,
|
|
1091
1169
|
body: null,
|
|
1092
|
-
querystring
|
|
1093
|
-
}
|
|
1170
|
+
querystring,
|
|
1171
|
+
};
|
|
1094
1172
|
|
|
1095
|
-
return this.transport.request(request, options, callback)
|
|
1096
|
-
}
|
|
1173
|
+
return this.transport.request(request, options, callback);
|
|
1174
|
+
};
|
|
1097
1175
|
|
|
1098
|
-
IndicesApi.prototype.refresh = function indicesRefreshApi
|
|
1099
|
-
|
|
1176
|
+
IndicesApi.prototype.refresh = function indicesRefreshApi(params, options, callback) {
|
|
1177
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1100
1178
|
|
|
1101
|
-
let { method, body, index, ...querystring } = params
|
|
1102
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1179
|
+
let { method, body, index, ...querystring } = params;
|
|
1180
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1103
1181
|
|
|
1104
|
-
let path = ''
|
|
1105
|
-
if (
|
|
1106
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1107
|
-
path = '/' + encodeURIComponent(index) + '/' + '_refresh'
|
|
1182
|
+
let path = '';
|
|
1183
|
+
if (index != null) {
|
|
1184
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
1185
|
+
path = '/' + encodeURIComponent(index) + '/' + '_refresh';
|
|
1108
1186
|
} else {
|
|
1109
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1110
|
-
path = '/' + '_refresh'
|
|
1187
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
1188
|
+
path = '/' + '_refresh';
|
|
1111
1189
|
}
|
|
1112
1190
|
|
|
1113
1191
|
// build request object
|
|
@@ -1115,64 +1193,70 @@ IndicesApi.prototype.refresh = function indicesRefreshApi (params, options, call
|
|
|
1115
1193
|
method,
|
|
1116
1194
|
path,
|
|
1117
1195
|
body: body || '',
|
|
1118
|
-
querystring
|
|
1119
|
-
}
|
|
1196
|
+
querystring,
|
|
1197
|
+
};
|
|
1120
1198
|
|
|
1121
|
-
return this.transport.request(request, options, callback)
|
|
1122
|
-
}
|
|
1199
|
+
return this.transport.request(request, options, callback);
|
|
1200
|
+
};
|
|
1123
1201
|
|
|
1124
|
-
IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi
|
|
1125
|
-
|
|
1202
|
+
IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi(params, options, callback) {
|
|
1203
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1126
1204
|
|
|
1127
1205
|
// check required parameters
|
|
1128
1206
|
if (params.name == null) {
|
|
1129
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1130
|
-
return handleError(err, callback)
|
|
1207
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
1208
|
+
return handleError(err, callback);
|
|
1131
1209
|
}
|
|
1132
1210
|
|
|
1133
|
-
let { method, body, name, ...querystring } = params
|
|
1134
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1211
|
+
let { method, body, name, ...querystring } = params;
|
|
1212
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1135
1213
|
|
|
1136
|
-
let path = ''
|
|
1137
|
-
if (method == null) method = 'GET'
|
|
1138
|
-
path = '/' + '_resolve' + '/' + 'index' + '/' + encodeURIComponent(name)
|
|
1214
|
+
let path = '';
|
|
1215
|
+
if (method == null) method = 'GET';
|
|
1216
|
+
path = '/' + '_resolve' + '/' + 'index' + '/' + encodeURIComponent(name);
|
|
1139
1217
|
|
|
1140
1218
|
// build request object
|
|
1141
1219
|
const request = {
|
|
1142
1220
|
method,
|
|
1143
1221
|
path,
|
|
1144
1222
|
body: null,
|
|
1145
|
-
querystring
|
|
1146
|
-
}
|
|
1223
|
+
querystring,
|
|
1224
|
+
};
|
|
1147
1225
|
|
|
1148
|
-
return this.transport.request(request, options, callback)
|
|
1149
|
-
}
|
|
1226
|
+
return this.transport.request(request, options, callback);
|
|
1227
|
+
};
|
|
1150
1228
|
|
|
1151
|
-
IndicesApi.prototype.rollover = function indicesRolloverApi
|
|
1152
|
-
|
|
1229
|
+
IndicesApi.prototype.rollover = function indicesRolloverApi(params, options, callback) {
|
|
1230
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1153
1231
|
|
|
1154
1232
|
// check required parameters
|
|
1155
1233
|
if (params.alias == null) {
|
|
1156
|
-
const err = new this[kConfigurationError]('Missing required parameter: alias')
|
|
1157
|
-
return handleError(err, callback)
|
|
1234
|
+
const err = new this[kConfigurationError]('Missing required parameter: alias');
|
|
1235
|
+
return handleError(err, callback);
|
|
1158
1236
|
}
|
|
1159
1237
|
|
|
1160
1238
|
// check required url components
|
|
1161
|
-
if ((params.new_index != null || params.newIndex != null) &&
|
|
1162
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: alias')
|
|
1163
|
-
return handleError(err, callback)
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
let { method, body, alias, newIndex, new_index, ...querystring } = params
|
|
1167
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1168
|
-
|
|
1169
|
-
let path = ''
|
|
1170
|
-
if (
|
|
1171
|
-
if (method == null) method = 'POST'
|
|
1172
|
-
path =
|
|
1239
|
+
if ((params.new_index != null || params.newIndex != null) && params.alias == null) {
|
|
1240
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: alias');
|
|
1241
|
+
return handleError(err, callback);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
let { method, body, alias, newIndex, new_index, ...querystring } = params;
|
|
1245
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1246
|
+
|
|
1247
|
+
let path = '';
|
|
1248
|
+
if (alias != null && (new_index || newIndex) != null) {
|
|
1249
|
+
if (method == null) method = 'POST';
|
|
1250
|
+
path =
|
|
1251
|
+
'/' +
|
|
1252
|
+
encodeURIComponent(alias) +
|
|
1253
|
+
'/' +
|
|
1254
|
+
'_rollover' +
|
|
1255
|
+
'/' +
|
|
1256
|
+
encodeURIComponent(new_index || newIndex);
|
|
1173
1257
|
} else {
|
|
1174
|
-
if (method == null) method = 'POST'
|
|
1175
|
-
path = '/' + encodeURIComponent(alias) + '/' + '_rollover'
|
|
1258
|
+
if (method == null) method = 'POST';
|
|
1259
|
+
path = '/' + encodeURIComponent(alias) + '/' + '_rollover';
|
|
1176
1260
|
}
|
|
1177
1261
|
|
|
1178
1262
|
// build request object
|
|
@@ -1180,25 +1264,25 @@ IndicesApi.prototype.rollover = function indicesRolloverApi (params, options, ca
|
|
|
1180
1264
|
method,
|
|
1181
1265
|
path,
|
|
1182
1266
|
body: body || '',
|
|
1183
|
-
querystring
|
|
1184
|
-
}
|
|
1267
|
+
querystring,
|
|
1268
|
+
};
|
|
1185
1269
|
|
|
1186
|
-
return this.transport.request(request, options, callback)
|
|
1187
|
-
}
|
|
1270
|
+
return this.transport.request(request, options, callback);
|
|
1271
|
+
};
|
|
1188
1272
|
|
|
1189
|
-
IndicesApi.prototype.segments = function indicesSegmentsApi
|
|
1190
|
-
|
|
1273
|
+
IndicesApi.prototype.segments = function indicesSegmentsApi(params, options, callback) {
|
|
1274
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1191
1275
|
|
|
1192
|
-
let { method, body, index, ...querystring } = params
|
|
1193
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1276
|
+
let { method, body, index, ...querystring } = params;
|
|
1277
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1194
1278
|
|
|
1195
|
-
let path = ''
|
|
1196
|
-
if (
|
|
1197
|
-
if (method == null) method = 'GET'
|
|
1198
|
-
path = '/' + encodeURIComponent(index) + '/' + '_segments'
|
|
1279
|
+
let path = '';
|
|
1280
|
+
if (index != null) {
|
|
1281
|
+
if (method == null) method = 'GET';
|
|
1282
|
+
path = '/' + encodeURIComponent(index) + '/' + '_segments';
|
|
1199
1283
|
} else {
|
|
1200
|
-
if (method == null) method = 'GET'
|
|
1201
|
-
path = '/' + '_segments'
|
|
1284
|
+
if (method == null) method = 'GET';
|
|
1285
|
+
path = '/' + '_segments';
|
|
1202
1286
|
}
|
|
1203
1287
|
|
|
1204
1288
|
// build request object
|
|
@@ -1206,25 +1290,25 @@ IndicesApi.prototype.segments = function indicesSegmentsApi (params, options, ca
|
|
|
1206
1290
|
method,
|
|
1207
1291
|
path,
|
|
1208
1292
|
body: null,
|
|
1209
|
-
querystring
|
|
1210
|
-
}
|
|
1293
|
+
querystring,
|
|
1294
|
+
};
|
|
1211
1295
|
|
|
1212
|
-
return this.transport.request(request, options, callback)
|
|
1213
|
-
}
|
|
1296
|
+
return this.transport.request(request, options, callback);
|
|
1297
|
+
};
|
|
1214
1298
|
|
|
1215
|
-
IndicesApi.prototype.shardStores = function indicesShardStoresApi
|
|
1216
|
-
|
|
1299
|
+
IndicesApi.prototype.shardStores = function indicesShardStoresApi(params, options, callback) {
|
|
1300
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1217
1301
|
|
|
1218
|
-
let { method, body, index, ...querystring } = params
|
|
1219
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1302
|
+
let { method, body, index, ...querystring } = params;
|
|
1303
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1220
1304
|
|
|
1221
|
-
let path = ''
|
|
1222
|
-
if (
|
|
1223
|
-
if (method == null) method = 'GET'
|
|
1224
|
-
path = '/' + encodeURIComponent(index) + '/' + '_shard_stores'
|
|
1305
|
+
let path = '';
|
|
1306
|
+
if (index != null) {
|
|
1307
|
+
if (method == null) method = 'GET';
|
|
1308
|
+
path = '/' + encodeURIComponent(index) + '/' + '_shard_stores';
|
|
1225
1309
|
} else {
|
|
1226
|
-
if (method == null) method = 'GET'
|
|
1227
|
-
path = '/' + '_shard_stores'
|
|
1310
|
+
if (method == null) method = 'GET';
|
|
1311
|
+
path = '/' + '_shard_stores';
|
|
1228
1312
|
}
|
|
1229
1313
|
|
|
1230
1314
|
// build request object
|
|
@@ -1232,89 +1316,97 @@ IndicesApi.prototype.shardStores = function indicesShardStoresApi (params, optio
|
|
|
1232
1316
|
method,
|
|
1233
1317
|
path,
|
|
1234
1318
|
body: null,
|
|
1235
|
-
querystring
|
|
1236
|
-
}
|
|
1319
|
+
querystring,
|
|
1320
|
+
};
|
|
1237
1321
|
|
|
1238
|
-
return this.transport.request(request, options, callback)
|
|
1239
|
-
}
|
|
1322
|
+
return this.transport.request(request, options, callback);
|
|
1323
|
+
};
|
|
1240
1324
|
|
|
1241
|
-
IndicesApi.prototype.shrink = function indicesShrinkApi
|
|
1242
|
-
|
|
1325
|
+
IndicesApi.prototype.shrink = function indicesShrinkApi(params, options, callback) {
|
|
1326
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1243
1327
|
|
|
1244
1328
|
// check required parameters
|
|
1245
1329
|
if (params.index == null) {
|
|
1246
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1247
|
-
return handleError(err, callback)
|
|
1330
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
1331
|
+
return handleError(err, callback);
|
|
1248
1332
|
}
|
|
1249
1333
|
if (params.target == null) {
|
|
1250
|
-
const err = new this[kConfigurationError]('Missing required parameter: target')
|
|
1251
|
-
return handleError(err, callback)
|
|
1334
|
+
const err = new this[kConfigurationError]('Missing required parameter: target');
|
|
1335
|
+
return handleError(err, callback);
|
|
1252
1336
|
}
|
|
1253
1337
|
|
|
1254
1338
|
// check required url components
|
|
1255
|
-
if (params.target != null &&
|
|
1256
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1257
|
-
return handleError(err, callback)
|
|
1339
|
+
if (params.target != null && params.index == null) {
|
|
1340
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
1341
|
+
return handleError(err, callback);
|
|
1258
1342
|
}
|
|
1259
1343
|
|
|
1260
|
-
let { method, body, index, target, ...querystring } = params
|
|
1261
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1344
|
+
let { method, body, index, target, ...querystring } = params;
|
|
1345
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1262
1346
|
|
|
1263
|
-
let path = ''
|
|
1264
|
-
if (method == null) method = 'PUT'
|
|
1265
|
-
path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target)
|
|
1347
|
+
let path = '';
|
|
1348
|
+
if (method == null) method = 'PUT';
|
|
1349
|
+
path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target);
|
|
1266
1350
|
|
|
1267
1351
|
// build request object
|
|
1268
1352
|
const request = {
|
|
1269
1353
|
method,
|
|
1270
1354
|
path,
|
|
1271
1355
|
body: body || '',
|
|
1272
|
-
querystring
|
|
1273
|
-
}
|
|
1356
|
+
querystring,
|
|
1357
|
+
};
|
|
1274
1358
|
|
|
1275
|
-
return this.transport.request(request, options, callback)
|
|
1276
|
-
}
|
|
1359
|
+
return this.transport.request(request, options, callback);
|
|
1360
|
+
};
|
|
1277
1361
|
|
|
1278
|
-
IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTemplateApi
|
|
1279
|
-
|
|
1362
|
+
IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTemplateApi(
|
|
1363
|
+
params,
|
|
1364
|
+
options,
|
|
1365
|
+
callback
|
|
1366
|
+
) {
|
|
1367
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1280
1368
|
|
|
1281
1369
|
// check required parameters
|
|
1282
1370
|
if (params.name == null) {
|
|
1283
|
-
const err = new this[kConfigurationError]('Missing required parameter: name')
|
|
1284
|
-
return handleError(err, callback)
|
|
1371
|
+
const err = new this[kConfigurationError]('Missing required parameter: name');
|
|
1372
|
+
return handleError(err, callback);
|
|
1285
1373
|
}
|
|
1286
1374
|
|
|
1287
|
-
let { method, body, name, ...querystring } = params
|
|
1288
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1375
|
+
let { method, body, name, ...querystring } = params;
|
|
1376
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1289
1377
|
|
|
1290
|
-
let path = ''
|
|
1291
|
-
if (method == null) method = 'POST'
|
|
1292
|
-
path = '/' + '_index_template' + '/' + '_simulate_index' + '/' + encodeURIComponent(name)
|
|
1378
|
+
let path = '';
|
|
1379
|
+
if (method == null) method = 'POST';
|
|
1380
|
+
path = '/' + '_index_template' + '/' + '_simulate_index' + '/' + encodeURIComponent(name);
|
|
1293
1381
|
|
|
1294
1382
|
// build request object
|
|
1295
1383
|
const request = {
|
|
1296
1384
|
method,
|
|
1297
1385
|
path,
|
|
1298
1386
|
body: body || '',
|
|
1299
|
-
querystring
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
return this.transport.request(request, options, callback)
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
IndicesApi.prototype.simulateTemplate = function indicesSimulateTemplateApi
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1387
|
+
querystring,
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
return this.transport.request(request, options, callback);
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
IndicesApi.prototype.simulateTemplate = function indicesSimulateTemplateApi(
|
|
1394
|
+
params,
|
|
1395
|
+
options,
|
|
1396
|
+
callback
|
|
1397
|
+
) {
|
|
1398
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1399
|
+
|
|
1400
|
+
let { method, body, name, ...querystring } = params;
|
|
1401
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1402
|
+
|
|
1403
|
+
let path = '';
|
|
1404
|
+
if (name != null) {
|
|
1405
|
+
if (method == null) method = 'POST';
|
|
1406
|
+
path = '/' + '_index_template' + '/' + '_simulate' + '/' + encodeURIComponent(name);
|
|
1315
1407
|
} else {
|
|
1316
|
-
if (method == null) method = 'POST'
|
|
1317
|
-
path = '/' + '_index_template' + '/' + '_simulate'
|
|
1408
|
+
if (method == null) method = 'POST';
|
|
1409
|
+
path = '/' + '_index_template' + '/' + '_simulate';
|
|
1318
1410
|
}
|
|
1319
1411
|
|
|
1320
1412
|
// build request object
|
|
@@ -1322,68 +1414,68 @@ IndicesApi.prototype.simulateTemplate = function indicesSimulateTemplateApi (par
|
|
|
1322
1414
|
method,
|
|
1323
1415
|
path,
|
|
1324
1416
|
body: body || '',
|
|
1325
|
-
querystring
|
|
1326
|
-
}
|
|
1417
|
+
querystring,
|
|
1418
|
+
};
|
|
1327
1419
|
|
|
1328
|
-
return this.transport.request(request, options, callback)
|
|
1329
|
-
}
|
|
1420
|
+
return this.transport.request(request, options, callback);
|
|
1421
|
+
};
|
|
1330
1422
|
|
|
1331
|
-
IndicesApi.prototype.split = function indicesSplitApi
|
|
1332
|
-
|
|
1423
|
+
IndicesApi.prototype.split = function indicesSplitApi(params, options, callback) {
|
|
1424
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1333
1425
|
|
|
1334
1426
|
// check required parameters
|
|
1335
1427
|
if (params.index == null) {
|
|
1336
|
-
const err = new this[kConfigurationError]('Missing required parameter: index')
|
|
1337
|
-
return handleError(err, callback)
|
|
1428
|
+
const err = new this[kConfigurationError]('Missing required parameter: index');
|
|
1429
|
+
return handleError(err, callback);
|
|
1338
1430
|
}
|
|
1339
1431
|
if (params.target == null) {
|
|
1340
|
-
const err = new this[kConfigurationError]('Missing required parameter: target')
|
|
1341
|
-
return handleError(err, callback)
|
|
1432
|
+
const err = new this[kConfigurationError]('Missing required parameter: target');
|
|
1433
|
+
return handleError(err, callback);
|
|
1342
1434
|
}
|
|
1343
1435
|
|
|
1344
1436
|
// check required url components
|
|
1345
|
-
if (params.target != null &&
|
|
1346
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1347
|
-
return handleError(err, callback)
|
|
1437
|
+
if (params.target != null && params.index == null) {
|
|
1438
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
1439
|
+
return handleError(err, callback);
|
|
1348
1440
|
}
|
|
1349
1441
|
|
|
1350
|
-
let { method, body, index, target, ...querystring } = params
|
|
1351
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1442
|
+
let { method, body, index, target, ...querystring } = params;
|
|
1443
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1352
1444
|
|
|
1353
|
-
let path = ''
|
|
1354
|
-
if (method == null) method = 'PUT'
|
|
1355
|
-
path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target)
|
|
1445
|
+
let path = '';
|
|
1446
|
+
if (method == null) method = 'PUT';
|
|
1447
|
+
path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target);
|
|
1356
1448
|
|
|
1357
1449
|
// build request object
|
|
1358
1450
|
const request = {
|
|
1359
1451
|
method,
|
|
1360
1452
|
path,
|
|
1361
1453
|
body: body || '',
|
|
1362
|
-
querystring
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
return this.transport.request(request, options, callback)
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
IndicesApi.prototype.stats = function indicesStatsApi
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
let { method, body, metric, index, ...querystring } = params
|
|
1372
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1373
|
-
|
|
1374
|
-
let path = ''
|
|
1375
|
-
if (
|
|
1376
|
-
if (method == null) method = 'GET'
|
|
1377
|
-
path = '/' + encodeURIComponent(index) + '/' + '_stats' + '/' + encodeURIComponent(metric)
|
|
1378
|
-
} else if (
|
|
1379
|
-
if (method == null) method = 'GET'
|
|
1380
|
-
path = '/' + '_stats' + '/' + encodeURIComponent(metric)
|
|
1381
|
-
} else if (
|
|
1382
|
-
if (method == null) method = 'GET'
|
|
1383
|
-
path = '/' + encodeURIComponent(index) + '/' + '_stats'
|
|
1454
|
+
querystring,
|
|
1455
|
+
};
|
|
1456
|
+
|
|
1457
|
+
return this.transport.request(request, options, callback);
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
IndicesApi.prototype.stats = function indicesStatsApi(params, options, callback) {
|
|
1461
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1462
|
+
|
|
1463
|
+
let { method, body, metric, index, ...querystring } = params;
|
|
1464
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1465
|
+
|
|
1466
|
+
let path = '';
|
|
1467
|
+
if (index != null && metric != null) {
|
|
1468
|
+
if (method == null) method = 'GET';
|
|
1469
|
+
path = '/' + encodeURIComponent(index) + '/' + '_stats' + '/' + encodeURIComponent(metric);
|
|
1470
|
+
} else if (metric != null) {
|
|
1471
|
+
if (method == null) method = 'GET';
|
|
1472
|
+
path = '/' + '_stats' + '/' + encodeURIComponent(metric);
|
|
1473
|
+
} else if (index != null) {
|
|
1474
|
+
if (method == null) method = 'GET';
|
|
1475
|
+
path = '/' + encodeURIComponent(index) + '/' + '_stats';
|
|
1384
1476
|
} else {
|
|
1385
|
-
if (method == null) method = 'GET'
|
|
1386
|
-
path = '/' + '_stats'
|
|
1477
|
+
if (method == null) method = 'GET';
|
|
1478
|
+
path = '/' + '_stats';
|
|
1387
1479
|
}
|
|
1388
1480
|
|
|
1389
1481
|
// build request object
|
|
@@ -1391,82 +1483,90 @@ IndicesApi.prototype.stats = function indicesStatsApi (params, options, callback
|
|
|
1391
1483
|
method,
|
|
1392
1484
|
path,
|
|
1393
1485
|
body: null,
|
|
1394
|
-
querystring
|
|
1395
|
-
}
|
|
1486
|
+
querystring,
|
|
1487
|
+
};
|
|
1396
1488
|
|
|
1397
|
-
return this.transport.request(request, options, callback)
|
|
1398
|
-
}
|
|
1489
|
+
return this.transport.request(request, options, callback);
|
|
1490
|
+
};
|
|
1399
1491
|
|
|
1400
|
-
IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi
|
|
1401
|
-
|
|
1492
|
+
IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi(params, options, callback) {
|
|
1493
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1402
1494
|
|
|
1403
1495
|
// check required parameters
|
|
1404
1496
|
if (params.body == null) {
|
|
1405
|
-
const err = new this[kConfigurationError]('Missing required parameter: body')
|
|
1406
|
-
return handleError(err, callback)
|
|
1497
|
+
const err = new this[kConfigurationError]('Missing required parameter: body');
|
|
1498
|
+
return handleError(err, callback);
|
|
1407
1499
|
}
|
|
1408
1500
|
|
|
1409
|
-
let { method, body, ...querystring } = params
|
|
1410
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1501
|
+
let { method, body, ...querystring } = params;
|
|
1502
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1411
1503
|
|
|
1412
|
-
let path = ''
|
|
1413
|
-
if (method == null) method = 'POST'
|
|
1414
|
-
path = '/' + '_aliases'
|
|
1504
|
+
let path = '';
|
|
1505
|
+
if (method == null) method = 'POST';
|
|
1506
|
+
path = '/' + '_aliases';
|
|
1415
1507
|
|
|
1416
1508
|
// build request object
|
|
1417
1509
|
const request = {
|
|
1418
1510
|
method,
|
|
1419
1511
|
path,
|
|
1420
1512
|
body: body || '',
|
|
1421
|
-
querystring
|
|
1422
|
-
}
|
|
1513
|
+
querystring,
|
|
1514
|
+
};
|
|
1423
1515
|
|
|
1424
|
-
return this.transport.request(request, options, callback)
|
|
1425
|
-
}
|
|
1516
|
+
return this.transport.request(request, options, callback);
|
|
1517
|
+
};
|
|
1426
1518
|
|
|
1427
|
-
IndicesApi.prototype.upgrade = function indicesUpgradeApi
|
|
1428
|
-
|
|
1519
|
+
IndicesApi.prototype.upgrade = function indicesUpgradeApi(params, options, callback) {
|
|
1520
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1429
1521
|
|
|
1430
|
-
let { method, body, index, ...querystring } = params
|
|
1431
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1522
|
+
let { method, body, index, ...querystring } = params;
|
|
1523
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1432
1524
|
|
|
1433
|
-
let path = ''
|
|
1434
|
-
if (method == null) method = 'POST'
|
|
1435
|
-
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
|
1525
|
+
let path = '';
|
|
1526
|
+
if (method == null) method = 'POST';
|
|
1527
|
+
path = '/' + encodeURIComponent(index) + '/' + '_upgrade';
|
|
1436
1528
|
|
|
1437
1529
|
// build request object
|
|
1438
1530
|
const request = {
|
|
1439
1531
|
method,
|
|
1440
1532
|
path,
|
|
1441
1533
|
body: body || '',
|
|
1442
|
-
querystring
|
|
1443
|
-
}
|
|
1534
|
+
querystring,
|
|
1535
|
+
};
|
|
1444
1536
|
|
|
1445
|
-
return this.transport.request(request, options, callback)
|
|
1446
|
-
}
|
|
1537
|
+
return this.transport.request(request, options, callback);
|
|
1538
|
+
};
|
|
1447
1539
|
|
|
1448
|
-
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi
|
|
1449
|
-
|
|
1540
|
+
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi(params, options, callback) {
|
|
1541
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
1450
1542
|
|
|
1451
1543
|
// check required url components
|
|
1452
|
-
if (params.type != null &&
|
|
1453
|
-
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
|
1454
|
-
return handleError(err, callback)
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
let { method, body, index, type, ...querystring } = params
|
|
1458
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
1459
|
-
|
|
1460
|
-
let path = ''
|
|
1461
|
-
if (
|
|
1462
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1463
|
-
path =
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1544
|
+
if (params.type != null && params.index == null) {
|
|
1545
|
+
const err = new this[kConfigurationError]('Missing required parameter of the url: index');
|
|
1546
|
+
return handleError(err, callback);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
let { method, body, index, type, ...querystring } = params;
|
|
1550
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
1551
|
+
|
|
1552
|
+
let path = '';
|
|
1553
|
+
if (index != null && type != null) {
|
|
1554
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
1555
|
+
path =
|
|
1556
|
+
'/' +
|
|
1557
|
+
encodeURIComponent(index) +
|
|
1558
|
+
'/' +
|
|
1559
|
+
encodeURIComponent(type) +
|
|
1560
|
+
'/' +
|
|
1561
|
+
'_validate' +
|
|
1562
|
+
'/' +
|
|
1563
|
+
'query';
|
|
1564
|
+
} else if (index != null) {
|
|
1565
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
1566
|
+
path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query';
|
|
1467
1567
|
} else {
|
|
1468
|
-
if (method == null) method = body == null ? 'GET' : 'POST'
|
|
1469
|
-
path = '/' + '_validate' + '/' + 'query'
|
|
1568
|
+
if (method == null) method = body == null ? 'GET' : 'POST';
|
|
1569
|
+
path = '/' + '_validate' + '/' + 'query';
|
|
1470
1570
|
}
|
|
1471
1571
|
|
|
1472
1572
|
// build request object
|
|
@@ -1474,43 +1574,153 @@ IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, o
|
|
|
1474
1574
|
method,
|
|
1475
1575
|
path,
|
|
1476
1576
|
body: body || '',
|
|
1477
|
-
querystring
|
|
1478
|
-
}
|
|
1577
|
+
querystring,
|
|
1578
|
+
};
|
|
1479
1579
|
|
|
1480
|
-
return this.transport.request(request, options, callback)
|
|
1481
|
-
}
|
|
1580
|
+
return this.transport.request(request, options, callback);
|
|
1581
|
+
};
|
|
1482
1582
|
|
|
1483
1583
|
Object.defineProperties(IndicesApi.prototype, {
|
|
1484
|
-
add_block: {
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1584
|
+
add_block: {
|
|
1585
|
+
get() {
|
|
1586
|
+
return this.addBlock;
|
|
1587
|
+
},
|
|
1588
|
+
},
|
|
1589
|
+
clear_cache: {
|
|
1590
|
+
get() {
|
|
1591
|
+
return this.clearCache;
|
|
1592
|
+
},
|
|
1593
|
+
},
|
|
1594
|
+
delete_alias: {
|
|
1595
|
+
get() {
|
|
1596
|
+
return this.deleteAlias;
|
|
1597
|
+
},
|
|
1598
|
+
},
|
|
1599
|
+
delete_index_template: {
|
|
1600
|
+
get() {
|
|
1601
|
+
return this.deleteIndexTemplate;
|
|
1602
|
+
},
|
|
1603
|
+
},
|
|
1604
|
+
delete_template: {
|
|
1605
|
+
get() {
|
|
1606
|
+
return this.deleteTemplate;
|
|
1607
|
+
},
|
|
1608
|
+
},
|
|
1609
|
+
disk_usage: {
|
|
1610
|
+
get() {
|
|
1611
|
+
return this.diskUsage;
|
|
1612
|
+
},
|
|
1613
|
+
},
|
|
1614
|
+
exists_alias: {
|
|
1615
|
+
get() {
|
|
1616
|
+
return this.existsAlias;
|
|
1617
|
+
},
|
|
1618
|
+
},
|
|
1619
|
+
exists_index_template: {
|
|
1620
|
+
get() {
|
|
1621
|
+
return this.existsIndexTemplate;
|
|
1622
|
+
},
|
|
1623
|
+
},
|
|
1624
|
+
exists_template: {
|
|
1625
|
+
get() {
|
|
1626
|
+
return this.existsTemplate;
|
|
1627
|
+
},
|
|
1628
|
+
},
|
|
1629
|
+
field_usage_stats: {
|
|
1630
|
+
get() {
|
|
1631
|
+
return this.fieldUsageStats;
|
|
1632
|
+
},
|
|
1633
|
+
},
|
|
1634
|
+
get_alias: {
|
|
1635
|
+
get() {
|
|
1636
|
+
return this.getAlias;
|
|
1637
|
+
},
|
|
1638
|
+
},
|
|
1639
|
+
get_field_mapping: {
|
|
1640
|
+
get() {
|
|
1641
|
+
return this.getFieldMapping;
|
|
1642
|
+
},
|
|
1643
|
+
},
|
|
1644
|
+
get_index_template: {
|
|
1645
|
+
get() {
|
|
1646
|
+
return this.getIndexTemplate;
|
|
1647
|
+
},
|
|
1648
|
+
},
|
|
1649
|
+
get_mapping: {
|
|
1650
|
+
get() {
|
|
1651
|
+
return this.getMapping;
|
|
1652
|
+
},
|
|
1653
|
+
},
|
|
1654
|
+
get_settings: {
|
|
1655
|
+
get() {
|
|
1656
|
+
return this.getSettings;
|
|
1657
|
+
},
|
|
1658
|
+
},
|
|
1659
|
+
get_template: {
|
|
1660
|
+
get() {
|
|
1661
|
+
return this.getTemplate;
|
|
1662
|
+
},
|
|
1663
|
+
},
|
|
1664
|
+
get_upgrade: {
|
|
1665
|
+
get() {
|
|
1666
|
+
return this.getUpgrade;
|
|
1667
|
+
},
|
|
1668
|
+
},
|
|
1669
|
+
put_alias: {
|
|
1670
|
+
get() {
|
|
1671
|
+
return this.putAlias;
|
|
1672
|
+
},
|
|
1673
|
+
},
|
|
1674
|
+
put_index_template: {
|
|
1675
|
+
get() {
|
|
1676
|
+
return this.putIndexTemplate;
|
|
1677
|
+
},
|
|
1678
|
+
},
|
|
1679
|
+
put_mapping: {
|
|
1680
|
+
get() {
|
|
1681
|
+
return this.putMapping;
|
|
1682
|
+
},
|
|
1683
|
+
},
|
|
1684
|
+
put_settings: {
|
|
1685
|
+
get() {
|
|
1686
|
+
return this.putSettings;
|
|
1687
|
+
},
|
|
1688
|
+
},
|
|
1689
|
+
put_template: {
|
|
1690
|
+
get() {
|
|
1691
|
+
return this.putTemplate;
|
|
1692
|
+
},
|
|
1693
|
+
},
|
|
1694
|
+
resolve_index: {
|
|
1695
|
+
get() {
|
|
1696
|
+
return this.resolveIndex;
|
|
1697
|
+
},
|
|
1698
|
+
},
|
|
1699
|
+
shard_stores: {
|
|
1700
|
+
get() {
|
|
1701
|
+
return this.shardStores;
|
|
1702
|
+
},
|
|
1703
|
+
},
|
|
1704
|
+
simulate_index_template: {
|
|
1705
|
+
get() {
|
|
1706
|
+
return this.simulateIndexTemplate;
|
|
1707
|
+
},
|
|
1708
|
+
},
|
|
1709
|
+
simulate_template: {
|
|
1710
|
+
get() {
|
|
1711
|
+
return this.simulateTemplate;
|
|
1712
|
+
},
|
|
1713
|
+
},
|
|
1714
|
+
update_aliases: {
|
|
1715
|
+
get() {
|
|
1716
|
+
return this.updateAliases;
|
|
1717
|
+
},
|
|
1718
|
+
},
|
|
1719
|
+
validate_query: {
|
|
1720
|
+
get() {
|
|
1721
|
+
return this.validateQuery;
|
|
1722
|
+
},
|
|
1723
|
+
},
|
|
1724
|
+
});
|
|
1725
|
+
|
|
1726
|
+
module.exports = IndicesApi;
|