@opensearch-project/opensearch 1.1.0 → 2.0.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 +26 -0
- package/.prettierrc.json +5 -0
- package/.whitesource +15 -0
- package/ADMINS.md +18 -11
- package/COMPATIBILITY.md +24 -0
- package/DEVELOPER_GUIDE.md +22 -5
- package/MAINTAINERS.md +23 -18
- package/README.md +100 -101
- package/RELEASING.md +3 -3
- package/SECURITY.md +1 -1
- package/api/api/bulk.js +53 -26
- package/api/api/cat.js +354 -264
- package/api/api/clear_scroll.js +17 -17
- package/api/api/cluster.js +366 -219
- package/api/api/count.js +55 -24
- package/api/api/create.js +50 -24
- package/api/api/dangling_indices.js +95 -51
- package/api/api/delete.js +49 -22
- package/api/api/delete_by_query.js +88 -25
- package/api/api/delete_by_query_rethrottle.js +33 -19
- package/api/api/delete_script.js +31 -17
- package/api/api/exists.js +55 -22
- package/api/api/exists_source.js +60 -27
- package/api/api/explain.js +60 -22
- package/api/api/features.js +56 -35
- package/api/api/field_caps.js +36 -18
- package/api/api/get.js +55 -22
- package/api/api/get_script.js +30 -17
- package/api/api/get_script_context.js +15 -15
- package/api/api/get_script_languages.js +15 -15
- package/api/api/get_source.js +55 -22
- package/api/api/index.js +60 -28
- package/api/api/indices.js +1068 -857
- package/api/api/info.js +15 -15
- package/api/api/ingest.js +132 -96
- package/api/api/mget.js +50 -26
- package/api/api/msearch.js +49 -26
- package/api/api/msearch_template.js +53 -26
- package/api/api/mtermvectors.js +48 -24
- package/api/api/nodes.js +281 -154
- package/api/api/ping.js +15 -15
- package/api/api/put_script.js +40 -25
- package/api/api/rank_eval.js +37 -20
- package/api/api/reindex.js +38 -17
- package/api/api/reindex_rethrottle.js +32 -19
- package/api/api/render_search_template.js +18 -18
- package/api/api/scripts_painless_execute.js +15 -15
- package/api/api/scroll.js +31 -17
- package/api/api/search.js +108 -24
- package/api/api/search_shards.js +36 -18
- package/api/api/search_template.js +64 -26
- package/api/api/shutdown.js +66 -54
- package/api/api/snapshot.js +347 -224
- package/api/api/tasks.js +65 -46
- package/api/api/terms_enum.js +17 -17
- package/api/api/termvectors.js +57 -26
- package/api/api/update.js +64 -24
- package/api/api/update_by_query.js +89 -23
- package/api/api/update_by_query_rethrottle.js +33 -19
- package/api/index.js +267 -179
- package/api/new.d.ts +2042 -529
- package/api/opensearch_dashboards.d.ts +239 -236
- package/api/requestParams.d.ts +301 -69
- package/api/types.d.ts +6204 -5719
- package/api/utils.js +22 -22
- package/codecov.yml +2 -2
- package/index.d.ts +4776 -935
- package/index.js +152 -140
- package/index.mjs +9 -9
- package/lib/Connection.d.ts +37 -26
- package/lib/Connection.js +163 -168
- package/lib/Helpers.d.ts +103 -64
- package/lib/Helpers.js +398 -371
- package/lib/Serializer.d.ts +2 -2
- package/lib/Serializer.js +39 -39
- package/lib/Transport.d.ts +30 -12
- package/lib/Transport.js +375 -336
- package/lib/errors.d.ts +25 -7
- package/lib/errors.js +75 -71
- package/lib/pool/BaseConnectionPool.js +100 -97
- package/lib/pool/CloudConnectionPool.js +16 -16
- package/lib/pool/ConnectionPool.js +105 -105
- package/lib/pool/index.d.ts +8 -6
- package/lib/pool/index.js +6 -6
- package/package.json +13 -8
package/api/index.js
CHANGED
|
@@ -28,227 +28,315 @@
|
|
|
28
28
|
* under the License.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
'use strict'
|
|
31
|
+
'use strict';
|
|
32
32
|
|
|
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')
|
|
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');
|
|
82
82
|
|
|
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')
|
|
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');
|
|
94
94
|
|
|
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
|
|
95
|
+
function OpenSearchAPI(opts) {
|
|
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;
|
|
107
107
|
}
|
|
108
108
|
|
|
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
|
|
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;
|
|
148
148
|
|
|
149
149
|
Object.defineProperties(OpenSearchAPI.prototype, {
|
|
150
150
|
cat: {
|
|
151
|
-
get
|
|
151
|
+
get() {
|
|
152
152
|
if (this[kCat] === null) {
|
|
153
|
-
this[kCat] = new CatApi(this.transport, this[kConfigurationError])
|
|
153
|
+
this[kCat] = new CatApi(this.transport, this[kConfigurationError]);
|
|
154
154
|
}
|
|
155
|
-
return this[kCat]
|
|
156
|
-
}
|
|
155
|
+
return this[kCat];
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
clear_scroll: {
|
|
159
|
+
get() {
|
|
160
|
+
return this.clearScroll;
|
|
161
|
+
},
|
|
157
162
|
},
|
|
158
|
-
clear_scroll: { get () { return this.clearScroll } },
|
|
159
163
|
cluster: {
|
|
160
|
-
get
|
|
164
|
+
get() {
|
|
161
165
|
if (this[kCluster] === null) {
|
|
162
|
-
this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError])
|
|
166
|
+
this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError]);
|
|
163
167
|
}
|
|
164
|
-
return this[kCluster]
|
|
165
|
-
}
|
|
168
|
+
return this[kCluster];
|
|
169
|
+
},
|
|
166
170
|
},
|
|
167
171
|
danglingIndices: {
|
|
168
|
-
get
|
|
172
|
+
get() {
|
|
169
173
|
if (this[kDanglingIndices] === null) {
|
|
170
|
-
this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError])
|
|
174
|
+
this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError]);
|
|
171
175
|
}
|
|
172
|
-
return this[kDanglingIndices]
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
dangling_indices: {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
return this[kDanglingIndices];
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
dangling_indices: {
|
|
180
|
+
get() {
|
|
181
|
+
return this.danglingIndices;
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
delete_by_query: {
|
|
185
|
+
get() {
|
|
186
|
+
return this.deleteByQuery;
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
delete_by_query_rethrottle: {
|
|
190
|
+
get() {
|
|
191
|
+
return this.deleteByQueryRethrottle;
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
delete_script: {
|
|
195
|
+
get() {
|
|
196
|
+
return this.deleteScript;
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
exists_source: {
|
|
200
|
+
get() {
|
|
201
|
+
return this.existsSource;
|
|
202
|
+
},
|
|
203
|
+
},
|
|
180
204
|
features: {
|
|
181
|
-
get
|
|
205
|
+
get() {
|
|
182
206
|
if (this[kFeatures] === null) {
|
|
183
|
-
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
|
|
207
|
+
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError]);
|
|
184
208
|
}
|
|
185
|
-
return this[kFeatures]
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
field_caps: {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
209
|
+
return this[kFeatures];
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
field_caps: {
|
|
213
|
+
get() {
|
|
214
|
+
return this.fieldCaps;
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
get_script: {
|
|
218
|
+
get() {
|
|
219
|
+
return this.getScript;
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
get_script_context: {
|
|
223
|
+
get() {
|
|
224
|
+
return this.getScriptContext;
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
get_script_languages: {
|
|
228
|
+
get() {
|
|
229
|
+
return this.getScriptLanguages;
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
get_source: {
|
|
233
|
+
get() {
|
|
234
|
+
return this.getSource;
|
|
235
|
+
},
|
|
236
|
+
},
|
|
193
237
|
indices: {
|
|
194
|
-
get
|
|
238
|
+
get() {
|
|
195
239
|
if (this[kIndices] === null) {
|
|
196
|
-
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError])
|
|
240
|
+
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError]);
|
|
197
241
|
}
|
|
198
|
-
return this[kIndices]
|
|
199
|
-
}
|
|
242
|
+
return this[kIndices];
|
|
243
|
+
},
|
|
200
244
|
},
|
|
201
245
|
ingest: {
|
|
202
|
-
get
|
|
246
|
+
get() {
|
|
203
247
|
if (this[kIngest] === null) {
|
|
204
|
-
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError])
|
|
248
|
+
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError]);
|
|
205
249
|
}
|
|
206
|
-
return this[kIngest]
|
|
207
|
-
}
|
|
250
|
+
return this[kIngest];
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
msearch_template: {
|
|
254
|
+
get() {
|
|
255
|
+
return this.msearchTemplate;
|
|
256
|
+
},
|
|
208
257
|
},
|
|
209
|
-
msearch_template: { get () { return this.msearchTemplate } },
|
|
210
258
|
nodes: {
|
|
211
|
-
get
|
|
259
|
+
get() {
|
|
212
260
|
if (this[kNodes] === null) {
|
|
213
|
-
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
|
|
261
|
+
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError]);
|
|
214
262
|
}
|
|
215
|
-
return this[kNodes]
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
put_script: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
263
|
+
return this[kNodes];
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
put_script: {
|
|
267
|
+
get() {
|
|
268
|
+
return this.putScript;
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
rank_eval: {
|
|
272
|
+
get() {
|
|
273
|
+
return this.rankEval;
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
reindex_rethrottle: {
|
|
277
|
+
get() {
|
|
278
|
+
return this.reindexRethrottle;
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
render_search_template: {
|
|
282
|
+
get() {
|
|
283
|
+
return this.renderSearchTemplate;
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
scripts_painless_execute: {
|
|
287
|
+
get() {
|
|
288
|
+
return this.scriptsPainlessExecute;
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
search_shards: {
|
|
292
|
+
get() {
|
|
293
|
+
return this.searchShards;
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
search_template: {
|
|
297
|
+
get() {
|
|
298
|
+
return this.searchTemplate;
|
|
299
|
+
},
|
|
300
|
+
},
|
|
225
301
|
shutdown: {
|
|
226
|
-
get
|
|
302
|
+
get() {
|
|
227
303
|
if (this[kShutdown] === null) {
|
|
228
|
-
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
|
|
304
|
+
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError]);
|
|
229
305
|
}
|
|
230
|
-
return this[kShutdown]
|
|
231
|
-
}
|
|
306
|
+
return this[kShutdown];
|
|
307
|
+
},
|
|
232
308
|
},
|
|
233
309
|
snapshot: {
|
|
234
|
-
get
|
|
310
|
+
get() {
|
|
235
311
|
if (this[kSnapshot] === null) {
|
|
236
|
-
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
|
|
312
|
+
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError]);
|
|
237
313
|
}
|
|
238
|
-
return this[kSnapshot]
|
|
239
|
-
}
|
|
314
|
+
return this[kSnapshot];
|
|
315
|
+
},
|
|
240
316
|
},
|
|
241
317
|
tasks: {
|
|
242
|
-
get
|
|
318
|
+
get() {
|
|
243
319
|
if (this[kTasks] === null) {
|
|
244
|
-
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
|
|
320
|
+
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError]);
|
|
245
321
|
}
|
|
246
|
-
return this[kTasks]
|
|
247
|
-
}
|
|
322
|
+
return this[kTasks];
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
terms_enum: {
|
|
326
|
+
get() {
|
|
327
|
+
return this.termsEnum;
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
update_by_query: {
|
|
331
|
+
get() {
|
|
332
|
+
return this.updateByQuery;
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
update_by_query_rethrottle: {
|
|
336
|
+
get() {
|
|
337
|
+
return this.updateByQueryRethrottle;
|
|
338
|
+
},
|
|
248
339
|
},
|
|
249
|
-
|
|
250
|
-
update_by_query: { get () { return this.updateByQuery } },
|
|
251
|
-
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } }
|
|
252
|
-
})
|
|
340
|
+
});
|
|
253
341
|
|
|
254
|
-
module.exports = OpenSearchAPI
|
|
342
|
+
module.exports = OpenSearchAPI;
|