elasticsearch 8.12.1__tar.gz → 8.13.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/PKG-INFO +28 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/README.rst +21 -6
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/async.rst +15 -15
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/helpers.rst +12 -1
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/index.rst +23 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/__init__.py +7 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/__init__.py +477 -128
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/_base.py +41 -1
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/async_search.py +40 -12
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/autoscaling.py +37 -11
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/cat.py +260 -69
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/ccr.py +123 -38
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/cluster.py +153 -42
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/dangling_indices.py +27 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/enrich.py +48 -14
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/eql.py +38 -12
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/esql.py +10 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/features.py +17 -4
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/fleet.py +30 -7
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/graph.py +11 -3
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/ilm.py +101 -29
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/indices.py +688 -181
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/inference.py +111 -44
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/ingest.py +59 -16
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/license.py +58 -14
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/logstash.py +31 -9
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/migration.py +28 -7
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/ml.py +781 -214
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/monitoring.py +10 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/nodes.py +103 -29
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/query_ruleset.py +37 -11
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/rollup.py +79 -24
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/search_application.py +76 -23
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/searchable_snapshots.py +49 -12
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/security.py +544 -143
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/shutdown.py +28 -6
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/slm.py +80 -22
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/snapshot.py +140 -54
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/sql.py +55 -15
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/ssl.py +9 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/synonyms.py +75 -21
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/tasks.py +29 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/text_structure.py +74 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/transform.py +106 -32
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/watcher.py +110 -31
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/xpack.py +16 -4
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/helpers.py +1 -1
- elasticsearch-8.13.1/elasticsearch/_otel.py +92 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/__init__.py +477 -128
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/_base.py +41 -1
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/async_search.py +40 -12
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/autoscaling.py +37 -11
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/cat.py +260 -69
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/ccr.py +123 -38
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/cluster.py +153 -42
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/dangling_indices.py +27 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/enrich.py +48 -14
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/eql.py +38 -12
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/esql.py +10 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/features.py +17 -4
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/fleet.py +30 -7
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/graph.py +11 -3
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/ilm.py +101 -29
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/indices.py +688 -181
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/inference.py +111 -44
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/ingest.py +59 -16
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/license.py +58 -14
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/logstash.py +31 -9
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/migration.py +28 -7
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/ml.py +781 -214
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/monitoring.py +10 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/nodes.py +103 -29
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/query_ruleset.py +37 -11
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/rollup.py +79 -24
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/search_application.py +76 -23
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/searchable_snapshots.py +49 -12
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/security.py +544 -143
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/shutdown.py +28 -6
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/slm.py +80 -22
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/snapshot.py +140 -54
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/sql.py +55 -15
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/ssl.py +9 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/synonyms.py +75 -21
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/tasks.py +29 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/text_structure.py +74 -2
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/transform.py +106 -32
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/watcher.py +110 -31
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/xpack.py +16 -4
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_version.py +1 -1
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/helpers/actions.py +1 -1
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/__init__.py +62 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_async/__init__.py +16 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_async/_utils.py +39 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_async/embedding_service.py +89 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_async/strategies.py +466 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_async/vectorstore.py +391 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_sync/__init__.py +16 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_sync/_utils.py +39 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_sync/embedding_service.py +89 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_sync/strategies.py +466 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_sync/vectorstore.py +388 -0
- elasticsearch-8.13.1/elasticsearch/helpers/vectorstore/_utils.py +116 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/serializer.py +14 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch.egg-info/PKG-INFO +28 -8
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch.egg-info/SOURCES.txt +14 -1
- elasticsearch-8.13.1/elasticsearch.egg-info/requires.txt +14 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/setup.cfg +1 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/setup.py +5 -5
- elasticsearch-8.12.1/elasticsearch.egg-info/requires.txt +0 -7
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/CHANGELOG.md +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/CONTRIBUTING.md +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/LICENSE +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/MANIFEST.in +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/NOTICE +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/Makefile +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/autoscaling.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/cat.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/ccr.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/cluster.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/dangling-indices.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/elasticsearch.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/enrich-policies.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/eql.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/esql.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/fleet.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/graph-explore.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/index-lifecycle-management.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/indices.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/inference.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/ingest-pipelines.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/license.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/logstash.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/migration.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/ml.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/monitoring.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/nodes.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/query-rules.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/rollup-indices.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/search-application.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/searchable-snapshots.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/security.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/shutdown.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/snapshot-lifecycle-management.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/snapshots.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/snapshottable-features.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/sql.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/synonyms.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/tasks.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/text-structure.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/tls-ssl.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/transforms.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/watcher.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api/x-pack.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/api.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/conf.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/exceptions.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/interactive.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/docs/sphinx/quickstart.rst +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/__init__.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_async/client/utils.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/__init__.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_sync/client/utils.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/_utils.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/client.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/compat.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/exceptions.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/helpers/__init__.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/helpers/errors.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/py.typed +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch/transport.py +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch.egg-info/dependency_links.txt +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch.egg-info/not-zip-safe +0 -0
- {elasticsearch-8.12.1 → elasticsearch-8.13.1}/elasticsearch.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: elasticsearch
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.13.1
|
|
4
4
|
Summary: Python client for Elasticsearch
|
|
5
5
|
Home-page: https://github.com/elastic/elasticsearch-py
|
|
6
6
|
Author: Elastic Client Library Maintainers
|
|
@@ -27,11 +27,16 @@ Requires-Python: >=3.7
|
|
|
27
27
|
Description-Content-Type: text/x-rst
|
|
28
28
|
License-File: LICENSE
|
|
29
29
|
License-File: NOTICE
|
|
30
|
-
Requires-Dist: elastic-transport<9,>=8
|
|
30
|
+
Requires-Dist: elastic-transport<9,>=8.13
|
|
31
31
|
Provides-Extra: requests
|
|
32
32
|
Requires-Dist: requests<3.0.0,>=2.4.0; extra == "requests"
|
|
33
33
|
Provides-Extra: async
|
|
34
34
|
Requires-Dist: aiohttp<4,>=3; extra == "async"
|
|
35
|
+
Provides-Extra: orjson
|
|
36
|
+
Requires-Dist: orjson>=3; extra == "orjson"
|
|
37
|
+
Provides-Extra: vectorstore-mmr
|
|
38
|
+
Requires-Dist: numpy>=1; extra == "vectorstore-mmr"
|
|
39
|
+
Requires-Dist: simsimd>=3; extra == "vectorstore-mmr"
|
|
35
40
|
|
|
36
41
|
|
|
37
42
|
Elasticsearch Python Client
|
|
@@ -46,8 +51,8 @@ Elasticsearch Python Client
|
|
|
46
51
|
.. image:: https://static.pepy.tech/badge/elasticsearch
|
|
47
52
|
:target: https://pepy.tech/project/elasticsearch?versions=*
|
|
48
53
|
|
|
49
|
-
.. image:: https://
|
|
50
|
-
:target: https://
|
|
54
|
+
.. image:: https://badge.buildkite.com/68e22afcb2ea8f6dcc20834e3a5b5ab4431beee33d3bd751f3.svg
|
|
55
|
+
:target: https://buildkite.com/elastic/elasticsearch-py-integration-tests
|
|
51
56
|
|
|
52
57
|
.. image:: https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest&style=flat
|
|
53
58
|
:target: https://elasticsearch-py.readthedocs.io
|
|
@@ -104,12 +109,27 @@ Usage
|
|
|
104
109
|
Compatibility
|
|
105
110
|
-------------
|
|
106
111
|
|
|
107
|
-
Language clients are forward compatible; meaning that clients support
|
|
108
|
-
with greater or equal minor versions of Elasticsearch
|
|
109
|
-
|
|
112
|
+
Language clients are forward compatible; meaning that the clients support
|
|
113
|
+
communicating with greater or equal minor versions of Elasticsearch without
|
|
114
|
+
breaking. It does not mean that the clients automatically support new features
|
|
115
|
+
of newer Elasticsearch versions; it is only possible after a release of a new
|
|
116
|
+
client version. For example, a 8.12 client version won't automatically support
|
|
117
|
+
the new features of the 8.13 version of Elasticsearch, the 8.13 client version
|
|
118
|
+
is required for that. Elasticsearch language clients are only backwards
|
|
119
|
+
compatible with default distributions and without guarantees made.
|
|
120
|
+
|
|
121
|
+
+-----------------------+-------------------------+-----------+
|
|
122
|
+
| Elasticsearch version | elasticsearch-py branch | Supported |
|
|
123
|
+
+=======================+=========================+===========+
|
|
124
|
+
| main | main | |
|
|
125
|
+
+-----------------------+-------------------------+-----------+
|
|
126
|
+
| 8.x | 8.x | 8.x |
|
|
127
|
+
+-----------------------+-------------------------+-----------+
|
|
128
|
+
| 7.x | 7.x | 7.17 |
|
|
129
|
+
+-----------------------+-------------------------+-----------+
|
|
110
130
|
|
|
111
131
|
If you have a need to have multiple versions installed at the same time older
|
|
112
|
-
versions are also released as ``
|
|
132
|
+
versions are also released as ``elasticsearch7`` and ``elasticsearch8``.
|
|
113
133
|
|
|
114
134
|
|
|
115
135
|
Documentation
|
|
@@ -14,8 +14,8 @@ Elasticsearch Python Client
|
|
|
14
14
|
.. image:: https://static.pepy.tech/badge/elasticsearch
|
|
15
15
|
:target: https://pepy.tech/project/elasticsearch?versions=*
|
|
16
16
|
|
|
17
|
-
.. image:: https://
|
|
18
|
-
:target: https://
|
|
17
|
+
.. image:: https://badge.buildkite.com/68e22afcb2ea8f6dcc20834e3a5b5ab4431beee33d3bd751f3.svg
|
|
18
|
+
:target: https://buildkite.com/elastic/elasticsearch-py-integration-tests
|
|
19
19
|
|
|
20
20
|
.. image:: https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest&style=flat
|
|
21
21
|
:target: https://elasticsearch-py.readthedocs.io
|
|
@@ -72,12 +72,27 @@ Usage
|
|
|
72
72
|
Compatibility
|
|
73
73
|
-------------
|
|
74
74
|
|
|
75
|
-
Language clients are forward compatible; meaning that clients support
|
|
76
|
-
with greater or equal minor versions of Elasticsearch
|
|
77
|
-
|
|
75
|
+
Language clients are forward compatible; meaning that the clients support
|
|
76
|
+
communicating with greater or equal minor versions of Elasticsearch without
|
|
77
|
+
breaking. It does not mean that the clients automatically support new features
|
|
78
|
+
of newer Elasticsearch versions; it is only possible after a release of a new
|
|
79
|
+
client version. For example, a 8.12 client version won't automatically support
|
|
80
|
+
the new features of the 8.13 version of Elasticsearch, the 8.13 client version
|
|
81
|
+
is required for that. Elasticsearch language clients are only backwards
|
|
82
|
+
compatible with default distributions and without guarantees made.
|
|
83
|
+
|
|
84
|
+
+-----------------------+-------------------------+-----------+
|
|
85
|
+
| Elasticsearch version | elasticsearch-py branch | Supported |
|
|
86
|
+
+=======================+=========================+===========+
|
|
87
|
+
| main | main | |
|
|
88
|
+
+-----------------------+-------------------------+-----------+
|
|
89
|
+
| 8.x | 8.x | 8.x |
|
|
90
|
+
+-----------------------+-------------------------+-----------+
|
|
91
|
+
| 7.x | 7.x | 7.17 |
|
|
92
|
+
+-----------------------+-------------------------+-----------+
|
|
78
93
|
|
|
79
94
|
If you have a need to have multiple versions installed at the same time older
|
|
80
|
-
versions are also released as ``
|
|
95
|
+
versions are also released as ``elasticsearch7`` and ``elasticsearch8``.
|
|
81
96
|
|
|
82
97
|
|
|
83
98
|
Documentation
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Using
|
|
1
|
+
Using asyncio with Elasticsearch
|
|
2
2
|
================================
|
|
3
3
|
|
|
4
4
|
.. py:module:: elasticsearch
|
|
5
5
|
:no-index:
|
|
6
6
|
|
|
7
7
|
The ``elasticsearch`` package supports async/await with
|
|
8
|
-
`
|
|
8
|
+
`asyncio <https://docs.python.org/3/library/asyncio.html>`_ and `aiohttp <https://docs.aiohttp.org>`_.
|
|
9
9
|
You can either install ``aiohttp`` directly or use the ``[async]`` extra:
|
|
10
10
|
|
|
11
11
|
.. code-block:: bash
|
|
@@ -27,10 +27,10 @@ and are used in the same way as other APIs, just with an extra ``await``:
|
|
|
27
27
|
import asyncio
|
|
28
28
|
from elasticsearch import AsyncElasticsearch
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
client = AsyncElasticsearch()
|
|
31
31
|
|
|
32
32
|
async def main():
|
|
33
|
-
resp = await
|
|
33
|
+
resp = await client.search(
|
|
34
34
|
index="documents",
|
|
35
35
|
body={"query": {"match_all": {}}},
|
|
36
36
|
size=20,
|
|
@@ -97,20 +97,20 @@ For example if using FastAPI that might look like this:
|
|
|
97
97
|
from elasticsearch import AsyncElasticsearch
|
|
98
98
|
|
|
99
99
|
ELASTICSEARCH_URL = os.environ["ELASTICSEARCH_URL"]
|
|
100
|
-
|
|
100
|
+
client = None
|
|
101
101
|
|
|
102
102
|
@asynccontextmanager
|
|
103
103
|
async def lifespan(app: FastAPI):
|
|
104
|
-
global
|
|
105
|
-
|
|
104
|
+
global client
|
|
105
|
+
client = AsyncElasticsearch(ELASTICSEARCH_URL)
|
|
106
106
|
yield
|
|
107
|
-
await
|
|
107
|
+
await client.close()
|
|
108
108
|
|
|
109
109
|
app = FastAPI(lifespan=lifespan)
|
|
110
110
|
|
|
111
111
|
@app.get("/")
|
|
112
112
|
async def main():
|
|
113
|
-
return await
|
|
113
|
+
return await client.info()
|
|
114
114
|
|
|
115
115
|
You can run this example by saving it to ``main.py`` and executing
|
|
116
116
|
``ELASTICSEARCH_URL=http://localhost:9200 uvicorn main:app``.
|
|
@@ -140,7 +140,7 @@ Bulk and Streaming Bulk
|
|
|
140
140
|
from elasticsearch import AsyncElasticsearch
|
|
141
141
|
from elasticsearch.helpers import async_bulk
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
client = AsyncElasticsearch()
|
|
144
144
|
|
|
145
145
|
async def gendata():
|
|
146
146
|
mywords = ['foo', 'bar', 'baz']
|
|
@@ -151,7 +151,7 @@ Bulk and Streaming Bulk
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
async def main():
|
|
154
|
-
await async_bulk(
|
|
154
|
+
await async_bulk(client, gendata())
|
|
155
155
|
|
|
156
156
|
loop = asyncio.get_event_loop()
|
|
157
157
|
loop.run_until_complete(main())
|
|
@@ -164,7 +164,7 @@ Bulk and Streaming Bulk
|
|
|
164
164
|
from elasticsearch import AsyncElasticsearch
|
|
165
165
|
from elasticsearch.helpers import async_streaming_bulk
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
client = AsyncElasticsearch()
|
|
168
168
|
|
|
169
169
|
async def gendata():
|
|
170
170
|
mywords = ['foo', 'bar', 'baz']
|
|
@@ -175,7 +175,7 @@ Bulk and Streaming Bulk
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
async def main():
|
|
178
|
-
async for ok, result in async_streaming_bulk(
|
|
178
|
+
async for ok, result in async_streaming_bulk(client, gendata()):
|
|
179
179
|
action, result = result.popitem()
|
|
180
180
|
if not ok:
|
|
181
181
|
print("failed to %s document %s" % ())
|
|
@@ -194,11 +194,11 @@ Scan
|
|
|
194
194
|
from elasticsearch import AsyncElasticsearch
|
|
195
195
|
from elasticsearch.helpers import async_scan
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
client = AsyncElasticsearch()
|
|
198
198
|
|
|
199
199
|
async def main():
|
|
200
200
|
async for doc in async_scan(
|
|
201
|
-
client=
|
|
201
|
+
client=client,
|
|
202
202
|
query={"query": {"match": {"title": "python"}}},
|
|
203
203
|
index="orders-*"
|
|
204
204
|
):
|
|
@@ -5,6 +5,15 @@ Helpers
|
|
|
5
5
|
|
|
6
6
|
Collection of simple helper functions that abstract some specifics of the raw API.
|
|
7
7
|
|
|
8
|
+
Connecting
|
|
9
|
+
----------
|
|
10
|
+
|
|
11
|
+
.. code-block:: python
|
|
12
|
+
|
|
13
|
+
from elasticsearch import Elasticsearch
|
|
14
|
+
|
|
15
|
+
client = Elasticsearch("https://.../", api_key="YOUR_API_KEY")
|
|
16
|
+
|
|
8
17
|
|
|
9
18
|
Bulk helpers
|
|
10
19
|
------------
|
|
@@ -74,6 +83,8 @@ document is like ``{"word": "<myword>"}``.
|
|
|
74
83
|
|
|
75
84
|
.. code:: python
|
|
76
85
|
|
|
86
|
+
from elasticsearch.helpers import bulk
|
|
87
|
+
|
|
77
88
|
def gendata():
|
|
78
89
|
mywords = ['foo', 'bar', 'baz']
|
|
79
90
|
for word in mywords:
|
|
@@ -82,7 +93,7 @@ document is like ``{"word": "<myword>"}``.
|
|
|
82
93
|
"word": word,
|
|
83
94
|
}
|
|
84
95
|
|
|
85
|
-
bulk(
|
|
96
|
+
bulk(client, gendata())
|
|
86
97
|
|
|
87
98
|
|
|
88
99
|
For a more complete and complex example please take a look at
|
|
@@ -34,9 +34,24 @@ Read more about `how to use asyncio with this project <async.html>`_.
|
|
|
34
34
|
Compatibility
|
|
35
35
|
-------------
|
|
36
36
|
|
|
37
|
-
Language clients are forward compatible; meaning that clients support
|
|
38
|
-
with greater or equal minor versions of Elasticsearch
|
|
39
|
-
|
|
37
|
+
Language clients are forward compatible; meaning that the clients support
|
|
38
|
+
communicating with greater or equal minor versions of Elasticsearch without
|
|
39
|
+
breaking. It does not mean that the clients automatically support new features
|
|
40
|
+
of newer Elasticsearch versions; it is only possible after a release of a new
|
|
41
|
+
client version. For example, a 8.12 client version won't automatically support
|
|
42
|
+
the new features of the 8.13 version of Elasticsearch, the 8.13 client version
|
|
43
|
+
is required for that. Elasticsearch language clients are only backwards
|
|
44
|
+
compatible with default distributions and without guarantees made.
|
|
45
|
+
|
|
46
|
+
+-----------------------+-------------------------+-----------+
|
|
47
|
+
| Elasticsearch version | elasticsearch-py branch | Supported |
|
|
48
|
+
+=======================+=========================+===========+
|
|
49
|
+
| main | main | |
|
|
50
|
+
+-----------------------+-------------------------+-----------+
|
|
51
|
+
| 8.x | 8.x | 8.x |
|
|
52
|
+
+-----------------------+-------------------------+-----------+
|
|
53
|
+
| 7.x | 7.x | 7.17 |
|
|
54
|
+
+-----------------------+-------------------------+-----------+
|
|
40
55
|
|
|
41
56
|
If you need multiple versions installed at the same time, versions are
|
|
42
57
|
also released, such as ``elasticsearch7`` and ``elasticsearch8``.
|
|
@@ -50,22 +65,22 @@ Example Usage
|
|
|
50
65
|
from datetime import datetime
|
|
51
66
|
from elasticsearch import Elasticsearch
|
|
52
67
|
|
|
53
|
-
|
|
68
|
+
client = Elasticsearch("http://localhost:9200/", api_key="YOUR_API_KEY")
|
|
54
69
|
|
|
55
70
|
doc = {
|
|
56
71
|
"author": "kimchy",
|
|
57
72
|
"text": "Elasticsearch: cool. bonsai cool.",
|
|
58
73
|
"timestamp": datetime.now(),
|
|
59
74
|
}
|
|
60
|
-
resp =
|
|
75
|
+
resp = client.index(index="test-index", id=1, document=doc)
|
|
61
76
|
print(resp["result"])
|
|
62
77
|
|
|
63
|
-
resp =
|
|
78
|
+
resp = client.get(index="test-index", id=1)
|
|
64
79
|
print(resp["_source"])
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
client.indices.refresh(index="test-index")
|
|
67
82
|
|
|
68
|
-
resp =
|
|
83
|
+
resp = client.search(index="test-index", query={"match_all": {}})
|
|
69
84
|
print("Got {} hits:".format(resp["hits"]["total"]["value"]))
|
|
70
85
|
for hit in resp["hits"]["hits"]:
|
|
71
86
|
print("{timestamp} {author} {text}".format(**hit["_source"]))
|
|
@@ -63,6 +63,11 @@ from .exceptions import (
|
|
|
63
63
|
)
|
|
64
64
|
from .serializer import JSONSerializer, JsonSerializer
|
|
65
65
|
|
|
66
|
+
try:
|
|
67
|
+
from .serializer import OrjsonSerializer
|
|
68
|
+
except ImportError:
|
|
69
|
+
OrjsonSerializer = None # type: ignore[assignment,misc]
|
|
70
|
+
|
|
66
71
|
# Only raise one warning per deprecation message so as not
|
|
67
72
|
# to spam up the user if the same action is done multiple times.
|
|
68
73
|
warnings.simplefilter("default", category=ElasticsearchWarning, append=True)
|
|
@@ -86,6 +91,8 @@ __all__ = [
|
|
|
86
91
|
"UnsupportedProductError",
|
|
87
92
|
"ElasticsearchWarning",
|
|
88
93
|
]
|
|
94
|
+
if OrjsonSerializer is not None:
|
|
95
|
+
__all__.append("OrjsonSerializer")
|
|
89
96
|
|
|
90
97
|
fixup_module_metadata(__name__, globals())
|
|
91
98
|
del fixup_module_metadata
|