@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
|
@@ -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,44 +27,58 @@
|
|
|
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
|
-
|
|
35
|
+
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils');
|
|
36
|
+
const acceptedQuerystring = [
|
|
37
|
+
'requests_per_second',
|
|
38
|
+
'pretty',
|
|
39
|
+
'human',
|
|
40
|
+
'error_trace',
|
|
41
|
+
'source',
|
|
42
|
+
'filter_path',
|
|
43
|
+
];
|
|
44
|
+
const snakeCase = {
|
|
45
|
+
requestsPerSecond: 'requests_per_second',
|
|
46
|
+
errorTrace: 'error_trace',
|
|
47
|
+
filterPath: 'filter_path',
|
|
48
|
+
};
|
|
39
49
|
|
|
40
|
-
function updateByQueryRethrottleApi
|
|
41
|
-
|
|
50
|
+
function updateByQueryRethrottleApi(params, options, callback) {
|
|
51
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
42
52
|
|
|
43
53
|
// check required parameters
|
|
44
54
|
if (params.task_id == null && params.taskId == null) {
|
|
45
|
-
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
|
46
|
-
return handleError(err, callback)
|
|
55
|
+
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId');
|
|
56
|
+
return handleError(err, callback);
|
|
47
57
|
}
|
|
48
58
|
if (params.requests_per_second == null && params.requestsPerSecond == null) {
|
|
49
|
-
const err = new this[kConfigurationError](
|
|
50
|
-
|
|
59
|
+
const err = new this[kConfigurationError](
|
|
60
|
+
'Missing required parameter: requests_per_second or requestsPerSecond'
|
|
61
|
+
);
|
|
62
|
+
return handleError(err, callback);
|
|
51
63
|
}
|
|
52
64
|
|
|
53
|
-
let { method, body, taskId, task_id, ...querystring } = params
|
|
54
|
-
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
65
|
+
let { method, body, taskId, task_id, ...querystring } = params;
|
|
66
|
+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring);
|
|
55
67
|
|
|
56
|
-
let path = ''
|
|
57
|
-
if (method == null) method = 'POST'
|
|
58
|
-
path =
|
|
68
|
+
let path = '';
|
|
69
|
+
if (method == null) method = 'POST';
|
|
70
|
+
path =
|
|
71
|
+
'/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle';
|
|
59
72
|
|
|
60
73
|
// build request object
|
|
61
74
|
const request = {
|
|
62
75
|
method,
|
|
63
76
|
path,
|
|
64
77
|
body: body || '',
|
|
65
|
-
querystring
|
|
66
|
-
}
|
|
78
|
+
querystring,
|
|
79
|
+
};
|
|
67
80
|
|
|
68
|
-
return this.transport.request(request, options, callback)
|
|
81
|
+
return this.transport.request(request, options, callback);
|
|
69
82
|
}
|
|
70
83
|
|
|
71
|
-
module.exports = updateByQueryRethrottleApi
|
|
84
|
+
module.exports = updateByQueryRethrottleApi;
|
package/api/index.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,227 +27,315 @@
|
|
|
28
27
|
* under the License.
|
|
29
28
|
*/
|
|
30
29
|
|
|
31
|
-
'use strict'
|
|
30
|
+
'use strict';
|
|
32
31
|
|
|
33
|
-
const bulkApi = require('./api/bulk')
|
|
34
|
-
const CatApi = require('./api/cat')
|
|
35
|
-
const clearScrollApi = require('./api/clear_scroll')
|
|
36
|
-
const ClusterApi = require('./api/cluster')
|
|
37
|
-
const countApi = require('./api/count')
|
|
38
|
-
const createApi = require('./api/create')
|
|
39
|
-
const DanglingIndicesApi = require('./api/dangling_indices')
|
|
40
|
-
const deleteApi = require('./api/delete')
|
|
41
|
-
const deleteByQueryApi = require('./api/delete_by_query')
|
|
42
|
-
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
|
|
43
|
-
const deleteScriptApi = require('./api/delete_script')
|
|
44
|
-
const existsApi = require('./api/exists')
|
|
45
|
-
const existsSourceApi = require('./api/exists_source')
|
|
46
|
-
const explainApi = require('./api/explain')
|
|
47
|
-
const FeaturesApi = require('./api/features')
|
|
48
|
-
const fieldCapsApi = require('./api/field_caps')
|
|
49
|
-
const getApi = require('./api/get')
|
|
50
|
-
const getScriptApi = require('./api/get_script')
|
|
51
|
-
const getScriptContextApi = require('./api/get_script_context')
|
|
52
|
-
const getScriptLanguagesApi = require('./api/get_script_languages')
|
|
53
|
-
const getSourceApi = require('./api/get_source')
|
|
54
|
-
const indexApi = require('./api/index')
|
|
55
|
-
const IndicesApi = require('./api/indices')
|
|
56
|
-
const infoApi = require('./api/info')
|
|
57
|
-
const IngestApi = require('./api/ingest')
|
|
58
|
-
const mgetApi = require('./api/mget')
|
|
59
|
-
const msearchApi = require('./api/msearch')
|
|
60
|
-
const msearchTemplateApi = require('./api/msearch_template')
|
|
61
|
-
const mtermvectorsApi = require('./api/mtermvectors')
|
|
62
|
-
const NodesApi = require('./api/nodes')
|
|
63
|
-
const pingApi = require('./api/ping')
|
|
64
|
-
const putScriptApi = require('./api/put_script')
|
|
65
|
-
const rankEvalApi = require('./api/rank_eval')
|
|
66
|
-
const reindexApi = require('./api/reindex')
|
|
67
|
-
const reindexRethrottleApi = require('./api/reindex_rethrottle')
|
|
68
|
-
const renderSearchTemplateApi = require('./api/render_search_template')
|
|
69
|
-
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
|
|
70
|
-
const scrollApi = require('./api/scroll')
|
|
71
|
-
const searchApi = require('./api/search')
|
|
72
|
-
const searchShardsApi = require('./api/search_shards')
|
|
73
|
-
const searchTemplateApi = require('./api/search_template')
|
|
74
|
-
const ShutdownApi = require('./api/shutdown')
|
|
75
|
-
const SnapshotApi = require('./api/snapshot')
|
|
76
|
-
const TasksApi = require('./api/tasks')
|
|
77
|
-
const termsEnumApi = require('./api/terms_enum')
|
|
78
|
-
const termvectorsApi = require('./api/termvectors')
|
|
79
|
-
const updateApi = require('./api/update')
|
|
80
|
-
const updateByQueryApi = require('./api/update_by_query')
|
|
81
|
-
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle')
|
|
32
|
+
const bulkApi = require('./api/bulk');
|
|
33
|
+
const CatApi = require('./api/cat');
|
|
34
|
+
const clearScrollApi = require('./api/clear_scroll');
|
|
35
|
+
const ClusterApi = require('./api/cluster');
|
|
36
|
+
const countApi = require('./api/count');
|
|
37
|
+
const createApi = require('./api/create');
|
|
38
|
+
const DanglingIndicesApi = require('./api/dangling_indices');
|
|
39
|
+
const deleteApi = require('./api/delete');
|
|
40
|
+
const deleteByQueryApi = require('./api/delete_by_query');
|
|
41
|
+
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle');
|
|
42
|
+
const deleteScriptApi = require('./api/delete_script');
|
|
43
|
+
const existsApi = require('./api/exists');
|
|
44
|
+
const existsSourceApi = require('./api/exists_source');
|
|
45
|
+
const explainApi = require('./api/explain');
|
|
46
|
+
const FeaturesApi = require('./api/features');
|
|
47
|
+
const fieldCapsApi = require('./api/field_caps');
|
|
48
|
+
const getApi = require('./api/get');
|
|
49
|
+
const getScriptApi = require('./api/get_script');
|
|
50
|
+
const getScriptContextApi = require('./api/get_script_context');
|
|
51
|
+
const getScriptLanguagesApi = require('./api/get_script_languages');
|
|
52
|
+
const getSourceApi = require('./api/get_source');
|
|
53
|
+
const indexApi = require('./api/index');
|
|
54
|
+
const IndicesApi = require('./api/indices');
|
|
55
|
+
const infoApi = require('./api/info');
|
|
56
|
+
const IngestApi = require('./api/ingest');
|
|
57
|
+
const mgetApi = require('./api/mget');
|
|
58
|
+
const msearchApi = require('./api/msearch');
|
|
59
|
+
const msearchTemplateApi = require('./api/msearch_template');
|
|
60
|
+
const mtermvectorsApi = require('./api/mtermvectors');
|
|
61
|
+
const NodesApi = require('./api/nodes');
|
|
62
|
+
const pingApi = require('./api/ping');
|
|
63
|
+
const putScriptApi = require('./api/put_script');
|
|
64
|
+
const rankEvalApi = require('./api/rank_eval');
|
|
65
|
+
const reindexApi = require('./api/reindex');
|
|
66
|
+
const reindexRethrottleApi = require('./api/reindex_rethrottle');
|
|
67
|
+
const renderSearchTemplateApi = require('./api/render_search_template');
|
|
68
|
+
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute');
|
|
69
|
+
const scrollApi = require('./api/scroll');
|
|
70
|
+
const searchApi = require('./api/search');
|
|
71
|
+
const searchShardsApi = require('./api/search_shards');
|
|
72
|
+
const searchTemplateApi = require('./api/search_template');
|
|
73
|
+
const ShutdownApi = require('./api/shutdown');
|
|
74
|
+
const SnapshotApi = require('./api/snapshot');
|
|
75
|
+
const TasksApi = require('./api/tasks');
|
|
76
|
+
const termsEnumApi = require('./api/terms_enum');
|
|
77
|
+
const termvectorsApi = require('./api/termvectors');
|
|
78
|
+
const updateApi = require('./api/update');
|
|
79
|
+
const updateByQueryApi = require('./api/update_by_query');
|
|
80
|
+
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle');
|
|
82
81
|
|
|
83
|
-
const { kConfigurationError } = require('./utils')
|
|
84
|
-
const kCat = Symbol('Cat')
|
|
85
|
-
const kCluster = Symbol('Cluster')
|
|
86
|
-
const kDanglingIndices = Symbol('DanglingIndices')
|
|
87
|
-
const kFeatures = Symbol('Features')
|
|
88
|
-
const kIndices = Symbol('Indices')
|
|
89
|
-
const kIngest = Symbol('Ingest')
|
|
90
|
-
const kNodes = Symbol('Nodes')
|
|
91
|
-
const kShutdown = Symbol('Shutdown')
|
|
92
|
-
const kSnapshot = Symbol('Snapshot')
|
|
93
|
-
const kTasks = Symbol('Tasks')
|
|
82
|
+
const { kConfigurationError } = require('./utils');
|
|
83
|
+
const kCat = Symbol('Cat');
|
|
84
|
+
const kCluster = Symbol('Cluster');
|
|
85
|
+
const kDanglingIndices = Symbol('DanglingIndices');
|
|
86
|
+
const kFeatures = Symbol('Features');
|
|
87
|
+
const kIndices = Symbol('Indices');
|
|
88
|
+
const kIngest = Symbol('Ingest');
|
|
89
|
+
const kNodes = Symbol('Nodes');
|
|
90
|
+
const kShutdown = Symbol('Shutdown');
|
|
91
|
+
const kSnapshot = Symbol('Snapshot');
|
|
92
|
+
const kTasks = Symbol('Tasks');
|
|
94
93
|
|
|
95
|
-
function OpenSearchAPI
|
|
96
|
-
this[kConfigurationError] = opts.ConfigurationError
|
|
97
|
-
this[kCat] = null
|
|
98
|
-
this[kCluster] = null
|
|
99
|
-
this[kDanglingIndices] = null
|
|
100
|
-
this[kFeatures] = null
|
|
101
|
-
this[kIndices] = null
|
|
102
|
-
this[kIngest] = null
|
|
103
|
-
this[kNodes] = null
|
|
104
|
-
this[kShutdown] = null
|
|
105
|
-
this[kSnapshot] = null
|
|
106
|
-
this[kTasks] = null
|
|
94
|
+
function OpenSearchAPI(opts) {
|
|
95
|
+
this[kConfigurationError] = opts.ConfigurationError;
|
|
96
|
+
this[kCat] = null;
|
|
97
|
+
this[kCluster] = null;
|
|
98
|
+
this[kDanglingIndices] = null;
|
|
99
|
+
this[kFeatures] = null;
|
|
100
|
+
this[kIndices] = null;
|
|
101
|
+
this[kIngest] = null;
|
|
102
|
+
this[kNodes] = null;
|
|
103
|
+
this[kShutdown] = null;
|
|
104
|
+
this[kSnapshot] = null;
|
|
105
|
+
this[kTasks] = null;
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
OpenSearchAPI.prototype.bulk = bulkApi
|
|
110
|
-
OpenSearchAPI.prototype.clearScroll = clearScrollApi
|
|
111
|
-
OpenSearchAPI.prototype.count = countApi
|
|
112
|
-
OpenSearchAPI.prototype.create = createApi
|
|
113
|
-
OpenSearchAPI.prototype.delete = deleteApi
|
|
114
|
-
OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi
|
|
115
|
-
OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi
|
|
116
|
-
OpenSearchAPI.prototype.deleteScript = deleteScriptApi
|
|
117
|
-
OpenSearchAPI.prototype.exists = existsApi
|
|
118
|
-
OpenSearchAPI.prototype.existsSource = existsSourceApi
|
|
119
|
-
OpenSearchAPI.prototype.explain = explainApi
|
|
120
|
-
OpenSearchAPI.prototype.fieldCaps = fieldCapsApi
|
|
121
|
-
OpenSearchAPI.prototype.get = getApi
|
|
122
|
-
OpenSearchAPI.prototype.getScript = getScriptApi
|
|
123
|
-
OpenSearchAPI.prototype.getScriptContext = getScriptContextApi
|
|
124
|
-
OpenSearchAPI.prototype.getScriptLanguages = getScriptLanguagesApi
|
|
125
|
-
OpenSearchAPI.prototype.getSource = getSourceApi
|
|
126
|
-
OpenSearchAPI.prototype.index = indexApi
|
|
127
|
-
OpenSearchAPI.prototype.info = infoApi
|
|
128
|
-
OpenSearchAPI.prototype.mget = mgetApi
|
|
129
|
-
OpenSearchAPI.prototype.msearch = msearchApi
|
|
130
|
-
OpenSearchAPI.prototype.msearchTemplate = msearchTemplateApi
|
|
131
|
-
OpenSearchAPI.prototype.mtermvectors = mtermvectorsApi
|
|
132
|
-
OpenSearchAPI.prototype.ping = pingApi
|
|
133
|
-
OpenSearchAPI.prototype.putScript = putScriptApi
|
|
134
|
-
OpenSearchAPI.prototype.rankEval = rankEvalApi
|
|
135
|
-
OpenSearchAPI.prototype.reindex = reindexApi
|
|
136
|
-
OpenSearchAPI.prototype.reindexRethrottle = reindexRethrottleApi
|
|
137
|
-
OpenSearchAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
|
|
138
|
-
OpenSearchAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
|
|
139
|
-
OpenSearchAPI.prototype.scroll = scrollApi
|
|
140
|
-
OpenSearchAPI.prototype.search = searchApi
|
|
141
|
-
OpenSearchAPI.prototype.searchShards = searchShardsApi
|
|
142
|
-
OpenSearchAPI.prototype.searchTemplate = searchTemplateApi
|
|
143
|
-
OpenSearchAPI.prototype.termsEnum = termsEnumApi
|
|
144
|
-
OpenSearchAPI.prototype.termvectors = termvectorsApi
|
|
145
|
-
OpenSearchAPI.prototype.update = updateApi
|
|
146
|
-
OpenSearchAPI.prototype.updateByQuery = updateByQueryApi
|
|
147
|
-
OpenSearchAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
|
108
|
+
OpenSearchAPI.prototype.bulk = bulkApi;
|
|
109
|
+
OpenSearchAPI.prototype.clearScroll = clearScrollApi;
|
|
110
|
+
OpenSearchAPI.prototype.count = countApi;
|
|
111
|
+
OpenSearchAPI.prototype.create = createApi;
|
|
112
|
+
OpenSearchAPI.prototype.delete = deleteApi;
|
|
113
|
+
OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi;
|
|
114
|
+
OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi;
|
|
115
|
+
OpenSearchAPI.prototype.deleteScript = deleteScriptApi;
|
|
116
|
+
OpenSearchAPI.prototype.exists = existsApi;
|
|
117
|
+
OpenSearchAPI.prototype.existsSource = existsSourceApi;
|
|
118
|
+
OpenSearchAPI.prototype.explain = explainApi;
|
|
119
|
+
OpenSearchAPI.prototype.fieldCaps = fieldCapsApi;
|
|
120
|
+
OpenSearchAPI.prototype.get = getApi;
|
|
121
|
+
OpenSearchAPI.prototype.getScript = getScriptApi;
|
|
122
|
+
OpenSearchAPI.prototype.getScriptContext = getScriptContextApi;
|
|
123
|
+
OpenSearchAPI.prototype.getScriptLanguages = getScriptLanguagesApi;
|
|
124
|
+
OpenSearchAPI.prototype.getSource = getSourceApi;
|
|
125
|
+
OpenSearchAPI.prototype.index = indexApi;
|
|
126
|
+
OpenSearchAPI.prototype.info = infoApi;
|
|
127
|
+
OpenSearchAPI.prototype.mget = mgetApi;
|
|
128
|
+
OpenSearchAPI.prototype.msearch = msearchApi;
|
|
129
|
+
OpenSearchAPI.prototype.msearchTemplate = msearchTemplateApi;
|
|
130
|
+
OpenSearchAPI.prototype.mtermvectors = mtermvectorsApi;
|
|
131
|
+
OpenSearchAPI.prototype.ping = pingApi;
|
|
132
|
+
OpenSearchAPI.prototype.putScript = putScriptApi;
|
|
133
|
+
OpenSearchAPI.prototype.rankEval = rankEvalApi;
|
|
134
|
+
OpenSearchAPI.prototype.reindex = reindexApi;
|
|
135
|
+
OpenSearchAPI.prototype.reindexRethrottle = reindexRethrottleApi;
|
|
136
|
+
OpenSearchAPI.prototype.renderSearchTemplate = renderSearchTemplateApi;
|
|
137
|
+
OpenSearchAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi;
|
|
138
|
+
OpenSearchAPI.prototype.scroll = scrollApi;
|
|
139
|
+
OpenSearchAPI.prototype.search = searchApi;
|
|
140
|
+
OpenSearchAPI.prototype.searchShards = searchShardsApi;
|
|
141
|
+
OpenSearchAPI.prototype.searchTemplate = searchTemplateApi;
|
|
142
|
+
OpenSearchAPI.prototype.termsEnum = termsEnumApi;
|
|
143
|
+
OpenSearchAPI.prototype.termvectors = termvectorsApi;
|
|
144
|
+
OpenSearchAPI.prototype.update = updateApi;
|
|
145
|
+
OpenSearchAPI.prototype.updateByQuery = updateByQueryApi;
|
|
146
|
+
OpenSearchAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi;
|
|
148
147
|
|
|
149
148
|
Object.defineProperties(OpenSearchAPI.prototype, {
|
|
150
149
|
cat: {
|
|
151
|
-
get
|
|
150
|
+
get() {
|
|
152
151
|
if (this[kCat] === null) {
|
|
153
|
-
this[kCat] = new CatApi(this.transport, this[kConfigurationError])
|
|
152
|
+
this[kCat] = new CatApi(this.transport, this[kConfigurationError]);
|
|
154
153
|
}
|
|
155
|
-
return this[kCat]
|
|
156
|
-
}
|
|
154
|
+
return this[kCat];
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
clear_scroll: {
|
|
158
|
+
get() {
|
|
159
|
+
return this.clearScroll;
|
|
160
|
+
},
|
|
157
161
|
},
|
|
158
|
-
clear_scroll: { get () { return this.clearScroll } },
|
|
159
162
|
cluster: {
|
|
160
|
-
get
|
|
163
|
+
get() {
|
|
161
164
|
if (this[kCluster] === null) {
|
|
162
|
-
this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError])
|
|
165
|
+
this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError]);
|
|
163
166
|
}
|
|
164
|
-
return this[kCluster]
|
|
165
|
-
}
|
|
167
|
+
return this[kCluster];
|
|
168
|
+
},
|
|
166
169
|
},
|
|
167
170
|
danglingIndices: {
|
|
168
|
-
get
|
|
171
|
+
get() {
|
|
169
172
|
if (this[kDanglingIndices] === null) {
|
|
170
|
-
this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError])
|
|
173
|
+
this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError]);
|
|
171
174
|
}
|
|
172
|
-
return this[kDanglingIndices]
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
dangling_indices: {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
return this[kDanglingIndices];
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
dangling_indices: {
|
|
179
|
+
get() {
|
|
180
|
+
return this.danglingIndices;
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
delete_by_query: {
|
|
184
|
+
get() {
|
|
185
|
+
return this.deleteByQuery;
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
delete_by_query_rethrottle: {
|
|
189
|
+
get() {
|
|
190
|
+
return this.deleteByQueryRethrottle;
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
delete_script: {
|
|
194
|
+
get() {
|
|
195
|
+
return this.deleteScript;
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
exists_source: {
|
|
199
|
+
get() {
|
|
200
|
+
return this.existsSource;
|
|
201
|
+
},
|
|
202
|
+
},
|
|
180
203
|
features: {
|
|
181
|
-
get
|
|
204
|
+
get() {
|
|
182
205
|
if (this[kFeatures] === null) {
|
|
183
|
-
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
|
|
206
|
+
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError]);
|
|
184
207
|
}
|
|
185
|
-
return this[kFeatures]
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
field_caps: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
208
|
+
return this[kFeatures];
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
field_caps: {
|
|
212
|
+
get() {
|
|
213
|
+
return this.fieldCaps;
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
get_script: {
|
|
217
|
+
get() {
|
|
218
|
+
return this.getScript;
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
get_script_context: {
|
|
222
|
+
get() {
|
|
223
|
+
return this.getScriptContext;
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
get_script_languages: {
|
|
227
|
+
get() {
|
|
228
|
+
return this.getScriptLanguages;
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
get_source: {
|
|
232
|
+
get() {
|
|
233
|
+
return this.getSource;
|
|
234
|
+
},
|
|
235
|
+
},
|
|
193
236
|
indices: {
|
|
194
|
-
get
|
|
237
|
+
get() {
|
|
195
238
|
if (this[kIndices] === null) {
|
|
196
|
-
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError])
|
|
239
|
+
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError]);
|
|
197
240
|
}
|
|
198
|
-
return this[kIndices]
|
|
199
|
-
}
|
|
241
|
+
return this[kIndices];
|
|
242
|
+
},
|
|
200
243
|
},
|
|
201
244
|
ingest: {
|
|
202
|
-
get
|
|
245
|
+
get() {
|
|
203
246
|
if (this[kIngest] === null) {
|
|
204
|
-
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError])
|
|
247
|
+
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError]);
|
|
205
248
|
}
|
|
206
|
-
return this[kIngest]
|
|
207
|
-
}
|
|
249
|
+
return this[kIngest];
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
msearch_template: {
|
|
253
|
+
get() {
|
|
254
|
+
return this.msearchTemplate;
|
|
255
|
+
},
|
|
208
256
|
},
|
|
209
|
-
msearch_template: { get () { return this.msearchTemplate } },
|
|
210
257
|
nodes: {
|
|
211
|
-
get
|
|
258
|
+
get() {
|
|
212
259
|
if (this[kNodes] === null) {
|
|
213
|
-
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
|
|
260
|
+
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError]);
|
|
214
261
|
}
|
|
215
|
-
return this[kNodes]
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
put_script: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
262
|
+
return this[kNodes];
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
put_script: {
|
|
266
|
+
get() {
|
|
267
|
+
return this.putScript;
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
rank_eval: {
|
|
271
|
+
get() {
|
|
272
|
+
return this.rankEval;
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
reindex_rethrottle: {
|
|
276
|
+
get() {
|
|
277
|
+
return this.reindexRethrottle;
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
render_search_template: {
|
|
281
|
+
get() {
|
|
282
|
+
return this.renderSearchTemplate;
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
scripts_painless_execute: {
|
|
286
|
+
get() {
|
|
287
|
+
return this.scriptsPainlessExecute;
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
search_shards: {
|
|
291
|
+
get() {
|
|
292
|
+
return this.searchShards;
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
search_template: {
|
|
296
|
+
get() {
|
|
297
|
+
return this.searchTemplate;
|
|
298
|
+
},
|
|
299
|
+
},
|
|
225
300
|
shutdown: {
|
|
226
|
-
get
|
|
301
|
+
get() {
|
|
227
302
|
if (this[kShutdown] === null) {
|
|
228
|
-
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
|
|
303
|
+
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError]);
|
|
229
304
|
}
|
|
230
|
-
return this[kShutdown]
|
|
231
|
-
}
|
|
305
|
+
return this[kShutdown];
|
|
306
|
+
},
|
|
232
307
|
},
|
|
233
308
|
snapshot: {
|
|
234
|
-
get
|
|
309
|
+
get() {
|
|
235
310
|
if (this[kSnapshot] === null) {
|
|
236
|
-
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
|
|
311
|
+
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError]);
|
|
237
312
|
}
|
|
238
|
-
return this[kSnapshot]
|
|
239
|
-
}
|
|
313
|
+
return this[kSnapshot];
|
|
314
|
+
},
|
|
240
315
|
},
|
|
241
316
|
tasks: {
|
|
242
|
-
get
|
|
317
|
+
get() {
|
|
243
318
|
if (this[kTasks] === null) {
|
|
244
|
-
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
|
|
319
|
+
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError]);
|
|
245
320
|
}
|
|
246
|
-
return this[kTasks]
|
|
247
|
-
}
|
|
321
|
+
return this[kTasks];
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
terms_enum: {
|
|
325
|
+
get() {
|
|
326
|
+
return this.termsEnum;
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
update_by_query: {
|
|
330
|
+
get() {
|
|
331
|
+
return this.updateByQuery;
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
update_by_query_rethrottle: {
|
|
335
|
+
get() {
|
|
336
|
+
return this.updateByQueryRethrottle;
|
|
337
|
+
},
|
|
248
338
|
},
|
|
249
|
-
|
|
250
|
-
update_by_query: { get () { return this.updateByQuery } },
|
|
251
|
-
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } }
|
|
252
|
-
})
|
|
339
|
+
});
|
|
253
340
|
|
|
254
|
-
module.exports = OpenSearchAPI
|
|
341
|
+
module.exports = OpenSearchAPI;
|