Skip to content

Commit 0949b58

Browse files
Expand the overview section of the docs
1 parent 06f25a0 commit 0949b58

File tree

1 file changed

+46
-30
lines changed

1 file changed

+46
-30
lines changed

docs/reference/index.md

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,18 @@ mapped_pages:
99

1010
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.
1111

12-
API reference documentation is provided on [Read the Docs](https://elasticsearch-py.readthedocs.io).
12+
This package is composed of several modules:
1313

14+
### The actual client
1415

15-
The following example shows a simple Python client use case:
16-
17-
```python
18-
>>> from datetime import datetime
19-
>>> from elasticsearch import Elasticsearch
20-
21-
# Connect to 'http://localhost:9200'
22-
>>> client = Elasticsearch("http://localhost:9200")
23-
24-
# Datetimes will be serialized:
25-
>>> client.index(index="my-index-000001", id=42, document={"any": "data", "timestamp": datetime.now()})
26-
{'_id': '42', '_index': 'my-index-000001', '_type': 'test-type', '_version': 1, 'ok': True}
27-
28-
# ...but not deserialized
29-
>>> client.get(index="my-index-000001", id=42)['_source']
30-
{'any': 'data', 'timestamp': '2013-05-12T19:45:31.804229'}
31-
```
16+
This module, sometimes also called the "low-level" client, implements the client support for sending requests to {{es}} servers. The entire surface of the {{es}} API can be reached through this module.
3217

18+
* [Features](#_features)
19+
* [Getting Started guide](getting-started.md)
20+
* [Ingest data with Python](docs-content://manage-data/ingest/ingesting-data-from-applications/ingest-data-with-python-on-elasticsearch-service.md) walkthrough
21+
* [Reference documentation](https://elasticsearch-py.readthedocs.io/en/stable/es_api.html)
3322

34-
35-
36-
## Features [_features]
23+
#### Features [_features]
3724

3825
The client's features include:
3926

@@ -45,19 +32,48 @@ The client's features include:
4532
* Thread safety
4633
* Pluggable architecture
4734

48-
The client also provides a convenient set of [helpers](client-helpers.md) for tasks like bulk indexing and reindexing.
35+
### Bulk helpers
36+
37+
The bulk helpers are a set of functions that use the low-level client's bulk ingest support through a high-level interface based on Python iterables that simplifies the ingest of large amounts of data.
38+
39+
* [User guide](client-helpers.md#bulk-helpers)
40+
* [Reference documentation](https://elasticsearch-py.readthedocs.io/en/stable/api_helpers.html)
41+
42+
### ES|QL query builder
4943

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-
::::
44+
This module offers an idiomatic interface to construct ES|QL queries using Python expressions.
5345

54-
### Elasticsearch Python DSL [_elasticsearch_python_dsl]
46+
* [User guide](esql-query-builder.md)
47+
* [Reference documentation](https://elasticsearch-py.readthedocs.io/en/stable/esql.html)
5548

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

58-
## {{es}} version compatibility [_compatibility]
51+
The DSL module could be thought of as a "high-level" client for {{es}}. It allows applications to manipulate documents and queries using Python classes and objects instead of primitive types such as dictionaries and lists.
5952

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.
53+
* [User guide](elasticsearch-dsl.md)
54+
* [Reference documentation](https://elasticsearch-py.readthedocs.io/en/stable/dsl.html)
55+
56+
## Example [_example]
57+
58+
The following example shows a simple Python client use case:
59+
60+
```python
61+
>>> from datetime import datetime
62+
>>> from elasticsearch import Elasticsearch
63+
64+
# Connect to 'http://localhost:9200'
65+
>>> client = Elasticsearch("http://localhost:9200")
66+
67+
# Datetimes will be serialized:
68+
>>> client.index(index="my-index-000001", id=42, document={"any": "data", "timestamp": datetime.now()})
69+
{'_id': '42', '_index': 'my-index-000001', '_type': 'test-type', '_version': 1, 'ok': True}
70+
71+
# ...but not deserialized
72+
>>> client.get(index="my-index-000001", id=42)['_source']
73+
{'any': 'data', 'timestamp': '2013-05-12T19:45:31.804229'}
74+
```
75+
76+
## Compatibility [_compatibility]
6177

6278
| Client version | {{es}} `8.x` | {{es}} `9.x` | {{es}} `10.x` |
6379
|----------------|---------------------------------|---------------------------------|----------------------------------|
@@ -82,4 +98,4 @@ In the Python client, compatibility mode is always enabled.
8298

8399
:::{tip}
84100
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-
:::
101+
:::

0 commit comments

Comments
 (0)