Updated docs

This commit is contained in:
delvedor
2019-03-12 10:50:58 +01:00
parent 40023c53a7
commit dc27cb11ed
3 changed files with 9 additions and 2 deletions

View File

@ -8,6 +8,7 @@ The official Node.js client for Elasticsearch.
* Configurable, automatic discovery of cluster nodes.
* Persistent, Keep-Alive connections.
* Load balancing (with pluggable selection strategy) across all available nodes.
* TypeScript support out of the box.
== Install
[source,sh]
@ -46,3 +47,5 @@ client.search({
* TypeScript support
* Extend the client
* Breaking changes from old client
* Authentication
* Child client

View File

@ -30,13 +30,16 @@ The returned value of every API call is formed as follows:
body: object | boolean
statusCode: number
headers: object
warnings: [string]
warnings: [string],
meta: object
}
----
NOTE: The body will be a boolean value when using `HEAD` APIs.
The above valiue will be returned even if there is an error during the execution of the request, this means that you can safely use the https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment[destructuring assignment].
The above value will be returned even if there is an error during the execution of the request, this means that you can safely use the https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment[destructuring assignment].
The `meta` key contains all the information regarding the request, such as attempt, options, and the connection that has been used.
[source,js]
----