Skip to content

Commit b8a5a3e

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

File tree

1 file changed

+45
-30
lines changed

1 file changed

+45
-30
lines changed

docs/reference/index.md

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,17 @@ 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 support for sending requests to {{es}} servers. The client provide access to the entire surface of the {{es}} API.
3217

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

34-
35-
36-
## Features [_features]
22+
#### Features [_features]
3723

3824
The client's features include:
3925

@@ -45,19 +31,48 @@ The client's features include:
4531
* Thread safety
4632
* Pluggable architecture
4733

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

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

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

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

58-
## {{es}} version compatibility [_compatibility]
50+
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.
5951

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

6277
| Client version | {{es}} `8.x` | {{es}} `9.x` | {{es}} `10.x` |
6378
|----------------|---------------------------------|---------------------------------|----------------------------------|
@@ -82,4 +97,4 @@ In the Python client, compatibility mode is always enabled.
8297

8398
:::{tip}
8499
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-
:::
100+
:::

0 commit comments

Comments
 (0)