Skip to content

Commit 2975b0f

Browse files
committed
Documentation: Update documentation with compatibility mode
1 parent 546082b commit 2975b0f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.doc/connecting.asciidoc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,11 @@ es, err := elasticsearch.NewClient(cfg)
6262

6363
[discrete]
6464
[[compatibility-mode]]
65-
==== Compatibility mode
65+
=== Compatibility mode
6666

67-
{es} server 8.0 introduces a compatibility mode allowing for a smoother transition from 7 to 8.
68-
Using the compatibility mode, the client sends versioned headers with each request instructing the server on the expected behaviour.
69-
------------------------------------
70-
Content-Type: application/vnd.elasticsearch+json; compatible-with=7
71-
Accept: application/vnd.elasticsearch+json; compatible-with=7
72-
------------------------------------
73-
This allows you to update the server first, then the client.
67+
The {es} server version 8.0 is introducing a new compatibility mode that allows you a smoother upgrade experience from 7 to 8. In a nutshell, you can use the latest 7.x `go-elasticsearch` Elasticsearch client with an 8.x Elasticsearch server, giving more room to coordinate the upgrade of your codebase to the next major version.
7468

75-
To enable this, the latest 7.x client can use the environment variable `ELASTIC_CLIENT_APIVERSIONING` or the configuration option `config.EnableCompatibilityMode` in the client Config.
69+
If you want to leverage this functionality, please make sure that you are using the latest 7.x `go-elasticsearch` client and set the environment variable `ELASTIC_CLIENT_APIVERSIONING` to `true` or the configuration option `config.EnableCompatibilityMode` in the client `Config`. The client is handling the rest internally. For every 8.0 and beyond `go-elasticsearch` client, you're all set! The compatibility mode is enabled by default.
7670

7771
[discrete]
7872
[[client-usage]]

0 commit comments

Comments
 (0)