@terascope/elasticsearch-api 3.6.0 → 3.6.1
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/index.js +6 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -971,6 +971,11 @@ module.exports = function elasticsearchApi(client, logger, _opConfig) {
|
|
|
971
971
|
return distribution === ElasticsearchDistribution.elasticsearch && majorVersion === 8;
|
|
972
972
|
}
|
|
973
973
|
|
|
974
|
+
function isOpensearch2() {
|
|
975
|
+
const { distribution, majorVersion } = getClientMetadata();
|
|
976
|
+
return distribution === ElasticsearchDistribution.opensearch && majorVersion === 2;
|
|
977
|
+
}
|
|
978
|
+
|
|
974
979
|
function _fixMappingRequest(_params, isTemplate) {
|
|
975
980
|
if (!_params || !_params.body) {
|
|
976
981
|
throw new Error('Invalid mapping request');
|
|
@@ -1000,7 +1005,7 @@ module.exports = function elasticsearchApi(client, logger, _opConfig) {
|
|
|
1000
1005
|
}
|
|
1001
1006
|
}
|
|
1002
1007
|
|
|
1003
|
-
if (isElasticsearch8(client)) {
|
|
1008
|
+
if (isElasticsearch8(client) || isOpensearch2(client)) {
|
|
1004
1009
|
delete defaultParams.includeTypeName;
|
|
1005
1010
|
}
|
|
1006
1011
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terascope/elasticsearch-api",
|
|
3
3
|
"displayName": "Elasticsearch API",
|
|
4
|
-
"version": "3.6.
|
|
4
|
+
"version": "3.6.1",
|
|
5
5
|
"description": "Elasticsearch client api used across multiple services, handles retries and exponential backoff",
|
|
6
6
|
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-api#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@opensearch-project/opensearch": "^1.2.0",
|
|
32
32
|
"@types/elasticsearch": "^5.0.40",
|
|
33
33
|
"elasticsearch": "^15.4.1",
|
|
34
|
-
"elasticsearch-store": "^0.67.
|
|
34
|
+
"elasticsearch-store": "^0.67.2",
|
|
35
35
|
"elasticsearch6": "npm:@elastic/elasticsearch@^6.7.0",
|
|
36
36
|
"elasticsearch7": "npm:@elastic/elasticsearch@^7.0.0",
|
|
37
37
|
"elasticsearch8": "npm:@elastic/elasticsearch@^8.0.0"
|