elasticsearch
Advanced tools
Comparing version 15.0.0 to 15.1.0
@@ -10,3 +10,3 @@ { | ||
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html", | ||
"version": "15.0.0", | ||
"version": "15.1.0", | ||
"keywords": [ | ||
@@ -33,4 +33,6 @@ "elasticsearch", | ||
}, | ||
"default_api_branch": "6.2", | ||
"default_api_branch": "6.3", | ||
"supported_es_branches": [ | ||
"6.3", | ||
"6.3", | ||
"6.2", | ||
@@ -37,0 +39,0 @@ "6.1", |
@@ -1,2 +0,2 @@ | ||
# elasticsearch.js 15.0.0 | ||
# elasticsearch.js 15.1.0 | ||
@@ -73,9 +73,10 @@ The official low-level Elasticsearch client for Node.js and the browser. | ||
```js | ||
client.search({ | ||
q: 'pants' | ||
}).then(function (body) { | ||
var hits = body.hits.hits; | ||
}, function (error) { | ||
console.trace(error.message); | ||
}); | ||
try { | ||
const response = await client.search({ | ||
q: 'pants' | ||
}); | ||
console.log(response.hits.hits) | ||
} catch (error) { | ||
console.trace(error.message) | ||
} | ||
``` | ||
@@ -85,3 +86,3 @@ | ||
```js | ||
client.search({ | ||
const response = await client.search({ | ||
index: 'twitter', | ||
@@ -96,7 +97,7 @@ type: 'tweets', | ||
} | ||
}).then(function (resp) { | ||
var hits = resp.hits.hits; | ||
}, function (err) { | ||
console.trace(err.message); | ||
}); | ||
}) | ||
for (const tweet of response.hits.hits) { | ||
console.log('tweet:', tweet); | ||
} | ||
``` | ||
@@ -103,0 +104,0 @@ |
module.exports = { | ||
'_default': require('./6_2'), | ||
'_default': require('./6_3'), | ||
'6.3': require('./6_3'), | ||
'_default': require('./6_3'), | ||
'6.3': require('./6_3'), | ||
'6.2': require('./6_2'), | ||
'6.1': require('./6_1'), | ||
'6.0': require('./6_0'), | ||
'5.6': require('./5_6'), | ||
'5.5': require('./5_5'), | ||
'6.x': require('./6_x'), | ||
'master': require('./master') | ||
}; |
module.exports = { | ||
get '_default'() { return require('./6_2'); }, | ||
get '_default'() { return require('./6_3'); }, | ||
get '6.3'() { return require('./6_3'); }, | ||
get '_default'() { return require('./6_3'); }, | ||
get '6.3'() { return require('./6_3'); }, | ||
get '6.2'() { return require('./6_2'); }, | ||
@@ -4,0 +7,0 @@ get '6.1'() { return require('./6_1'); }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3957197
111025
121