* CI: Added junit plugin
* Updated .gitignore
* Added integration test reporter
* Updated integration testing suite
* Updated ci config
* Updated report file path
* Use refresh 'true' instead of 'wait_for'
* Disable junit reporting
* Refresh one single time
* Update security index name
* Updated skip test handling and use class syntax
* Updated test script
* Disable test timeout
* Added command to automatically remove an old snapshot
* Disable timeout in integration test script
* Updated logs and cleaned up git handling
* Fixed shouldSkip utility
* Updated cleanup code
* Updated cleanup code pt 2
* Rename Platinum to XPack
* API generation
* Add 7.2.0 to testing matrix
* Use 7.2.0-SNAPSHOT
* API generation
* Updated custom skips
* Updated ES version
* Updated esDefaultRoles
Handles `console.log` and `utils.inspect` invocations for a better debugging experience.
`agent` and `ssl` are hidden since they made the logs very hard to read.
The user can still access them with `instance.agent` and `instance.ssl`.
In very few cases, some API uses the same key for both url and query params, such as the bulk method.
The client is not designed to handle such cases since accepts both url and query keys in the same object, and the url parameter will always take precedence.
This pr fixes this edge case by adding a `querystring` key in the options object.
Fixes: https://github.com/elastic/elasticsearch-js/pull/778
```js
client.bulk({
index: 'index',
type: '_doc',
body: [...]
}, {
querystring: {
type: '_doc'
}
}, console.log)
```
* Updated dependencies
* Updated .gitignore
* WIP: macro and micro benchmarks
* Updated benchmark suite
* Use the same suite for both macro and micro benchmarks
* WIP: benchmark report
* Updated benchmark suite
* Updated docker scripts
* Updated benchmark suite
* Updated scripts
* Updated benchmark suite
* Added split2
With this pr we introduce the `client.child` API, which returns a new client instance that shares the connection pool with the parent client.
This feature can be handy if you need to have multiple client instances with different configurations, but with a shared connection pool.
Example:
```js
const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
const child = client.child({
headers: { 'x-foo': 'bar' },
requestTimeout: 1000
})
client.info(console.log)
child.info(console.log)
```
**Open questions:**
* Currently, the event emitter is shared between the parent and the child(ren), is it ok?
* Currently, if you extend the parent client, the child client will have the same extensions, while if the child client adds an extension, the parent client will not be extended. Is it ok?
**Caveats:**
* You can override _any_ option except for the connection pool specific options (`ssl`, `agent`, `pingTimeout`, `Connection`, and `resurrectStrategy`).
* You can't specify a new `Connection` class.
* If you call `close` in any of the parent/child clients, every client will be closed.
_Note: the `nodeFilter` and `nodeSelector` options are now `Transport` options and no longer `ConnectionPool` options._