Skip to content

Commit 41a2159

Browse files
authored
Update docs to clarify 9.x compatibility (#2789)
1 parent 710b937 commit 41a2159

File tree

4 files changed

+31
-54
lines changed

4 files changed

+31
-54
lines changed

README.md

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Elasticsearch Node.js client
44

5-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://badge.buildkite.com/15e4246eb268ea78f6e10aa90bce38c1abb0a4489e79f5a0ac.svg)](https://buildkite.com/elastic/elasticsearch-javascript-client-integration-tests/builds?branch=main) [![Node CI](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml/badge.svg)](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/elastic/elasticsearch-js/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/elasticsearch-js) [![NPM downloads](https://img.shields.io/npm/dm/@elastic/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@elastic/elasticsearch)
5+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://badge.buildkite.com/15e4246eb268ea78f6e10aa90bce38c1abb0a4489e79f5a0ac.svg)](https://buildkite.com/elastic/elasticsearch-javascript-client-integration-tests/builds?branch=main) [![Node CI](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml/badge.svg)](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [![codecov](https://codecov.io/gh/elastic/elasticsearch-js/branch/master/graph/badge.svg)](https://codecov.io/gh/elastic/elasticsearch-js) [![NPM downloads](https://img.shields.io/npm/dm/@elastic/elasticsearch.svg?style=flat)](https://www.npmjs.com/package/@elastic/elasticsearch)
66

77
**[Download the latest version of Elasticsearch](https://www.elastic.co/downloads/elasticsearch)**
88
or
@@ -34,11 +34,12 @@ the new features of the 8.13 version of Elasticsearch, the 8.13 client version
3434
is required for that. Elasticsearch language clients are only backwards
3535
compatible with default distributions and without guarantees made.
3636

37-
| Elasticsearch Version | Elasticsearch-JS Branch | Supported |
38-
| --------------------- | ------------------------ | --------- |
39-
| main | main | |
40-
| 8.x | 8.x | 8.x |
41-
| 7.x | 7.x | 7.17 |
37+
| Elasticsearch Version | Elasticsearch-JS Branch |
38+
| --------------------- | ----------------------- |
39+
| main | main |
40+
| 9.x | 9.x |
41+
| 8.x | 8.x |
42+
| 7.x | 7.x |
4243

4344
## Usage
4445

@@ -65,36 +66,20 @@ to support that version for at least another minor release. If you are using the
6566
with a version of Node.js that will be unsupported soon, you will see a warning
6667
in your logs (the client will start logging the warning with two minors in advance).
6768

68-
Unless you are **always** using a supported version of Node.js,
69+
Unless you are **always** using a supported version of Node.js,
6970
we recommend defining the client dependency in your
7071
`package.json` with the `~` instead of `^`. In this way, you will lock the
7172
dependency on the minor release and not the major. (for example, `~7.10.0` instead
7273
of `^7.10.0`).
7374

74-
| Node.js Version | Node.js EOL date | End of support |
75-
| --------------- |------------------| ---------------------- |
76-
| `8.x` | `December 2019` | `7.11` (early 2021) |
77-
| `10.x` | `April 2021` | `7.12` (mid 2021) |
78-
| `12.x` | `April 2022` | `8.2` (early 2022) |
79-
| `14.x` | `April 2023` | `8.8` (early 2023) |
80-
| `16.x` | `September 2023` | `8.11` (late 2023) |
81-
82-
### Compatibility
83-
84-
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch.
85-
Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
86-
87-
| Elasticsearch Version | Client Version |
88-
| --------------------- |----------------|
89-
| `8.x` | `8.x` |
90-
| `7.x` | `7.x` |
91-
| `6.x` | `6.x` |
92-
| `5.x` | `5.x` |
93-
94-
To install a specific major of the client, run the following command:
95-
```
96-
npm install @elastic/elasticsearch@<major>
97-
```
75+
| Node.js Version | Node.js EOL date | End of support |
76+
| --------------- | ---------------- | ------------------- |
77+
| `8.x` | `December 2019` | `7.11` (early 2021) |
78+
| `10.x` | `April 2021` | `7.12` (mid 2021) |
79+
| `12.x` | `April 2022` | `8.2` (early 2022) |
80+
| `14.x` | `April 2023` | `8.8` (early 2023) |
81+
| `16.x` | `September 2023` | `8.11` (late 2023) |
82+
| `18.x` | `April 2025` | `9.2` (late 2025) |
9883

9984
#### Browser
10085

@@ -117,6 +102,7 @@ We recommend that you write a lightweight proxy that uses this client instead, y
117102
* [Examples](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/examples.html)
118103

119104
## Install multiple versions
105+
120106
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.
121107

122108
The command you must run to install different version of the client is:

docs/reference/client-helpers.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ console.log(result)
5151

5252
To create a new instance of the Bulk helper, access it as shown in the example above, the configuration options are:
5353

54-
5554
`datasource`
5655
: 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.
5756
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.

docs/reference/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ mapped_pages:
88

99
This is the official Node.js client for {{es}}. This page gives a quick overview about the features of the client.
1010

11-
1211
## Features [_features]
1312

1413
* One-to-one mapping with REST API.
@@ -19,7 +18,6 @@ This is the official Node.js client for {{es}}. This page gives a quick overview
1918
* Child client support.
2019
* TypeScript support out of the box.
2120

22-
2321
### Install multiple versions [_install_multiple_versions]
2422

2523
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.
@@ -74,5 +72,3 @@ npm install esmain@github:elastic/elasticsearch-js
7472
::::{warning}
7573
This command installs the main branch of the client which is not considered stable.
7674
::::
77-
78-

docs/reference/installation.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,41 @@ npm install @elastic/elasticsearch@<major>
2121

2222
To learn more about the supported major versions, please refer to the [Compatibility matrix](#js-compatibility-matrix).
2323

24-
2524
## Node.js support [nodejs-support]
2625

2726
::::{note}
2827
The minimum supported version of Node.js is `v18`.
2928
::::
3029

31-
3230
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.
3331

3432
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).
3533

3634
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`).
3735

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 |
37+
| --------------- | ---------------- | ------------------- |
38+
| `8.x` | December 2019 | `7.11` (early 2021) |
39+
| `10.x` | April 2021 | `7.12` (mid 2021) |
40+
| `12.x` | April 2022 | `8.2` (early 2022) |
41+
| `14.x` | April 2023 | `8.8` (early 2023) |
42+
| `16.x` | September 2023 | `8.11` (late 2023) |
43+
| `18.x` | April 2025 | `9.2` (late 2025) |
4644

4745
## Compatibility matrix [js-compatibility-matrix]
4846

4947
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.
5048

5149
| {{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` | |
5856

5957
### Browser [_browser]
6058

6159
::::{warning}
6260
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).
6361
::::
64-
65-

0 commit comments

Comments
 (0)