You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using multiple versions of Elasticsearch, you need to use multiple versions of the client. In the past, install multiple versions of the same package was not possible, but with `npm v6.9`, you can do that via aliasing.
121
107
122
108
The command you must run to install different version of the client is:
Copy file name to clipboardExpand all lines: docs/reference/client-helpers.md
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,6 @@ console.log(result)
51
51
52
52
To create a new instance of the Bulk helper, access it as shown in the example above, the configuration options are:
53
53
54
-
55
54
`datasource`
56
55
: An array, async generator or a readable stream with the data you need to index/create/update/delete. It can be an array of strings or objects, but also a stream of json strings or JavaScript objects.
57
56
If it is a stream, we recommend to use the [`split2`](https://www.npmjs.com/package/split2) package, that splits the stream on new lines delimiters.
If you are using multiple versions of {{es}}, you need to use multiple versions of the client as well. In the past, installing multiple versions of the same package was not possible, but with `npm v6.9`, you can do it via aliasing.
To learn more about the supported major versions, please refer to the [Compatibility matrix](#js-compatibility-matrix).
23
23
24
-
25
24
## Node.js support [nodejs-support]
26
25
27
26
::::{note}
28
27
The minimum supported version of Node.js is `v18`.
29
28
::::
30
29
31
-
32
30
The client versioning follows the {{stack}} versioning, this means that major, minor, and patch releases are done following a precise schedule that often does not coincide with the [Node.js release](https://nodejs.org/en/about/releases/) times.
33
31
34
32
To avoid support insecure and unsupported versions of Node.js, the client **will drop the support of EOL versions of Node.js between minor releases**. Typically, as soon as a Node.js version goes into EOL, the client will continue to support that version for at least another minor release. If you are using the client with a version of Node.js that will be unsupported soon, you will see a warning in your logs (the client will start logging the warning with two minors in advance).
35
33
36
34
Unless you are **always** using a supported version of Node.js, we recommend defining the client dependency in your `package.json` with the `~` instead of `^`. In this way, you will lock the dependency on the minor release and not the major. (for example, `~7.10.0` instead of `^7.10.0`).
37
35
38
-
| Node.js Version | Node.js EOL date | End of support |
39
-
| --- | --- | --- |
40
-
|`8.x`| December 2019 |`7.11` (early 2021) |
41
-
|`10.x`| April 2021 |`7.12` (mid 2021) |
42
-
|`12.x`| April 2022 |`8.2` (early 2022) |
43
-
|`14.x`| April 2023 |`8.8` (early 2023) |
44
-
|`16.x`| September 2023 |`8.11` (late 2023) |
45
-
36
+
| Node.js Version | Node.js EOL date | End of support |
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of {{es}} without breaking. It does not mean that the client automatically supports new features of newer {{es}} versions; it is only possible after a release of a new client version. For example, a 8.12 client version won’t automatically support the new features of the 8.13 version of {{es}}, the 8.13 client version is required for that. {{es}} language clients are only backwards compatible with default distributions and without guarantees made.
50
48
51
49
| {{es}} Version | Client Version | Supported |
52
-
| --- | --- | --- |
53
-
|`8.x`|`8.x`|`8.x`|
54
-
|`7.x`|`7.x`|`7.17`|
55
-
|`6.x`|`6.x`||
56
-
|`5.x`|`5.x`||
57
-
50
+
| --------------| --------------|--------- |
51
+
|`9.x`|`9.x`|`9.x`|
52
+
|`8.x`|`8.x`|`8.x`|
53
+
|`7.x`|`7.x`|`7.17`|
54
+
|`6.x`|`6.x`||
55
+
|`5.x`|`5.x`||
58
56
59
57
### Browser [_browser]
60
58
61
59
::::{warning}
62
60
There is no official support for the browser environment. It exposes your {{es}} instance to everyone, which could lead to security issues. We recommend you to write a lightweight proxy that uses this client instead, you can see a proxy example [here](https://github.com/elastic/elasticsearch-js/tree/master/docs/examples/proxy).
0 commit comments