Skip to content

Commit 06f25a0

Browse files
authored
[DOCS] Clarify upgrades and edit generally (#3138)
* Revise upgrade section; do a general edit * fix mis-paste * More edits * Review comments + more cleanup
1 parent 3a15e1b commit 06f25a0

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

docs/reference/index.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
---
2+
navigation_title: "Python"
23
mapped_pages:
34
- https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/index.html
45
- https://www.elastic.co/guide/en/elasticsearch/client/python-api/current/overview.html
56
---
67

7-
# Python [overview]
8+
# {{es}} Python client [overview]
89

9-
This is the official Python client for {{es}}. Its goal is to provide common ground for all {{es}}-related code in Python. For this reason, the client is designed to be unopinionated and extendable. API reference documentation for this client is available on [Read the Docs](https://elasticsearch-py.readthedocs.io).
10+
This documentation covers the [official Python client for {{es}}](https://github.com/elastic/elasticsearch-py). The goal of the Python client is to provide common ground for all {{es}}-related code in Python. The client is designed to be unopinionated and extendable.
1011

12+
API reference documentation is provided on [Read the Docs](https://elasticsearch-py.readthedocs.io).
1113

12-
## Example use [_example_use]
1314

14-
Simple use-case:
15+
The following example shows a simple Python client use case:
1516

1617
```python
1718
>>> from datetime import datetime
@@ -29,14 +30,12 @@ Simple use-case:
2930
{'any': 'data', 'timestamp': '2013-05-12T19:45:31.804229'}
3031
```
3132

32-
::::{tip}
33-
For an elaborate example of how to ingest data into Elastic Cloud, refer to [this page](docs-content://manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md).
34-
::::
33+
3534

3635

3736
## Features [_features]
3837

39-
The clients features include:
38+
The client's features include:
4039

4140
* Translating basic Python data types to and from JSON
4241
* Configurable automatic discovery of cluster nodes
@@ -46,37 +45,41 @@ The client’s features include:
4645
* Thread safety
4746
* Pluggable architecture
4847

49-
The client also contains a convenient set of [helpers](client-helpers.md) for some of the more engaging tasks like bulk indexing and reindexing.
48+
The client also provides a convenient set of [helpers](client-helpers.md) for tasks like bulk indexing and reindexing.
5049

50+
::::{tip}
51+
To get started, try this walkthrough: [Ingest data with Python](docs-content://manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md)
52+
::::
5153

52-
## Elasticsearch Python DSL [_elasticsearch_python_dsl]
53-
54-
For a higher level access with more limited scope, have a look at the DSL module, which provides a more convenient and idiomatic way to write and manipulate queries.
54+
### Elasticsearch Python DSL [_elasticsearch_python_dsl]
5555

56+
The [Python DSL module](../reference/elasticsearch-dsl.md) offers a convenient and idiomatic way to write and manipulate queries.
5657

57-
## Compatibility [_compatibility]
58+
## {{es}} version compatibility [_compatibility]
5859

59-
Language clients are _forward compatible:_ each client version works with equivalent and later minor versions of {{es}} without breaking.
60+
Language clients are **forward compatible**: each client version works with equivalent and later minor versions of the **same or next major** version of {{es}}. For full compatibility, the client and {{es}} minor versions should match.
6061

61-
Compatibility does not imply full feature parity. New {{es}} features are supported only in equivalent client versions. For example, an 8.12 client fully supports {{es}} 8.12 features and works with 8.13 without breaking; however, it does not support new {{es}} 8.13 features. An 8.13 client fully supports {{es}} 8.13 features.
62+
| Client version | {{es}} `8.x` | {{es}} `9.x` | {{es}} `10.x` |
63+
|----------------|---------------------------------|---------------------------------|----------------------------------|
64+
| 9.x client | ❌ Not compatible with {{es}} 8.x | ✅ Compatible with {{es}} 9.x | ✅ Compatible with {{es}} 10.x |
65+
| 8.x client | ✅ Compatible with {{es}} 8.x | ✅ Compatible with {{es}} 9.x | ❌ Not compatible with {{es}} 10.x |
6266

63-
| Elasticsearch version | elasticsearch-py branch |
64-
| --- | --- |
65-
| main | main |
66-
| 9.x | 9.x |
67-
| 9.x | 8.x |
68-
| 8.x | 8.x |
67+
Compatibility does not imply feature parity. New {{es}} features are supported only in equivalent client versions. For example, an 8.12 client fully supports {{es}} 8.12 features and works with 8.13 without breaking, but it does not support new {{es}} 8.13 features. An 8.13 client fully supports {{es}} 8.13 features.
6968

70-
{{es}} language clients are also _backward compatible_ across minor versions — with default distributions and without guarantees.
69+
{{es}} language clients are also **backward compatible** across minor versions, with default distributions and without guarantees.
7170

7271
### Major version upgrades
7372

74-
:::{tip}
75-
To upgrade to a new major version, first upgrade {{es}}, then upgrade the Python {{es}} client.
73+
:::{important}
74+
To upgrade to a new major version, first [upgrade {{es}}](docs-content://deploy-manage/upgrade.md), then upgrade the Python client.
7675
:::
7776

78-
Since version 8.0, the {{es}} server supports a compatibility mode that allows smoother upgrade experiences. In a nutshell, this makes it possible to upgrade the {{es}} server to the next major version, while continuing to use the same client. This gives more room to coordinate the upgrade of your codebase to the next major version.
77+
As of version 8.0, {{es}} offers a [compatibility mode](elasticsearch://reference/elasticsearch/rest-apis/compatibility.md) for smoother upgrades. In compatibility mode, you can upgrade your {{es}} cluster to the next major version while continuing to use your existing client during the transition.
7978

80-
For example, to upgrade a system that uses {{es}} 8.x you can upgrade the {{es}} server to 9.x first, and the 8.x Python {{es}} client will continue to work (aside from any breaking changes, which should be listed in the server release notes). You can continue using the 8.x client during the server migration, and only upgrade it once the server migration is complete. The process is described in detail in the [REST API compatibility workflow](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/compatibility#_rest_api_compatibility_workflow) section of the {{es}} documentation.
79+
For example, if you're upgrading {{es}} from 8.x to 9.x, you can continue to use the 8.x Python client during and after the {{es}} server upgrade, with the exception of [breaking changes](../release-notes/breaking-changes.md).
8180

82-
If you need to work with multiple client versions, note that older versions are also released with the `elasticsearch8` and `elasticsearch9` package names so that they can be installed together.
81+
In the Python client, compatibility mode is always enabled.
82+
83+
:::{tip}
84+
To support working with multiple client versions, the Python client is also released under the package names `elasticsearch8` and `elasticsearch9` (to prevent name collisions).
85+
:::

0 commit comments

Comments
 (0)