elasticsearch 8.15.0__py3-none-any.whl → 8.16.0__py3-none-any.whl
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/_async/client/__init__.py +202 -117
- elasticsearch/_async/client/async_search.py +25 -25
- elasticsearch/_async/client/autoscaling.py +24 -11
- elasticsearch/_async/client/cat.py +75 -66
- elasticsearch/_async/client/ccr.py +13 -13
- elasticsearch/_async/client/cluster.py +40 -37
- elasticsearch/_async/client/connector.py +112 -51
- elasticsearch/_async/client/dangling_indices.py +27 -12
- elasticsearch/_async/client/enrich.py +10 -10
- elasticsearch/_async/client/eql.py +4 -4
- elasticsearch/_async/client/esql.py +42 -4
- elasticsearch/_async/client/features.py +4 -3
- elasticsearch/_async/client/fleet.py +10 -2
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +16 -12
- elasticsearch/_async/client/indices.py +189 -108
- elasticsearch/_async/client/inference.py +15 -5
- elasticsearch/_async/client/ingest.py +200 -9
- elasticsearch/_async/client/license.py +10 -10
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +294 -291
- elasticsearch/_async/client/monitoring.py +1 -1
- elasticsearch/_async/client/nodes.py +16 -8
- elasticsearch/_async/client/query_rules.py +61 -8
- elasticsearch/_async/client/rollup.py +23 -9
- elasticsearch/_async/client/search_application.py +35 -16
- elasticsearch/_async/client/searchable_snapshots.py +13 -5
- elasticsearch/_async/client/security.py +371 -180
- elasticsearch/_async/client/slm.py +9 -9
- elasticsearch/_async/client/snapshot.py +97 -12
- elasticsearch/_async/client/sql.py +11 -7
- elasticsearch/_async/client/ssl.py +18 -3
- elasticsearch/_async/client/synonyms.py +10 -8
- elasticsearch/_async/client/tasks.py +19 -9
- elasticsearch/_async/client/text_structure.py +2 -2
- elasticsearch/_async/client/transform.py +78 -72
- elasticsearch/_async/client/utils.py +4 -0
- elasticsearch/_async/client/watcher.py +11 -11
- elasticsearch/_async/client/xpack.py +5 -3
- elasticsearch/_async/helpers.py +19 -10
- elasticsearch/_otel.py +23 -1
- elasticsearch/_sync/client/__init__.py +202 -117
- elasticsearch/_sync/client/async_search.py +25 -25
- elasticsearch/_sync/client/autoscaling.py +24 -11
- elasticsearch/_sync/client/cat.py +75 -66
- elasticsearch/_sync/client/ccr.py +13 -13
- elasticsearch/_sync/client/cluster.py +40 -37
- elasticsearch/_sync/client/connector.py +112 -51
- elasticsearch/_sync/client/dangling_indices.py +27 -12
- elasticsearch/_sync/client/enrich.py +10 -10
- elasticsearch/_sync/client/eql.py +4 -4
- elasticsearch/_sync/client/esql.py +42 -4
- elasticsearch/_sync/client/features.py +4 -3
- elasticsearch/_sync/client/fleet.py +10 -2
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +16 -12
- elasticsearch/_sync/client/indices.py +189 -108
- elasticsearch/_sync/client/inference.py +15 -5
- elasticsearch/_sync/client/ingest.py +200 -9
- elasticsearch/_sync/client/license.py +10 -10
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +294 -291
- elasticsearch/_sync/client/monitoring.py +1 -1
- elasticsearch/_sync/client/nodes.py +16 -8
- elasticsearch/_sync/client/query_rules.py +61 -8
- elasticsearch/_sync/client/rollup.py +23 -9
- elasticsearch/_sync/client/search_application.py +35 -16
- elasticsearch/_sync/client/searchable_snapshots.py +13 -5
- elasticsearch/_sync/client/security.py +371 -180
- elasticsearch/_sync/client/slm.py +9 -9
- elasticsearch/_sync/client/snapshot.py +97 -12
- elasticsearch/_sync/client/sql.py +11 -7
- elasticsearch/_sync/client/ssl.py +18 -3
- elasticsearch/_sync/client/synonyms.py +10 -8
- elasticsearch/_sync/client/tasks.py +19 -9
- elasticsearch/_sync/client/text_structure.py +2 -2
- elasticsearch/_sync/client/transform.py +78 -72
- elasticsearch/_sync/client/utils.py +40 -0
- elasticsearch/_sync/client/watcher.py +11 -11
- elasticsearch/_sync/client/xpack.py +5 -3
- elasticsearch/_version.py +1 -1
- elasticsearch/exceptions.py +4 -0
- elasticsearch/helpers/actions.py +134 -111
- elasticsearch/helpers/errors.py +12 -4
- elasticsearch/helpers/vectorstore/_async/strategies.py +30 -9
- elasticsearch/helpers/vectorstore/_sync/strategies.py +30 -9
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.16.0.dist-info}/METADATA +6 -7
- elasticsearch-8.16.0.dist-info/RECORD +117 -0
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.16.0.dist-info}/WHEEL +1 -1
- elasticsearch-8.15.0.dist-info/RECORD +0 -117
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.16.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.16.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -82,8 +82,10 @@ from .utils import (
|
|
|
82
82
|
_TYPE_HOSTS,
|
|
83
83
|
CLIENT_META_SERVICE,
|
|
84
84
|
SKIP_IN_PATH,
|
|
85
|
+
Stability,
|
|
85
86
|
_quote,
|
|
86
87
|
_rewrite_parameters,
|
|
88
|
+
_stability_warning,
|
|
87
89
|
client_node_configs,
|
|
88
90
|
is_requests_http_auth,
|
|
89
91
|
is_requests_node_class,
|
|
@@ -640,10 +642,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
640
642
|
] = None,
|
|
641
643
|
) -> ObjectApiResponse[t.Any]:
|
|
642
644
|
"""
|
|
643
|
-
|
|
644
|
-
overhead and can greatly increase indexing
|
|
645
|
+
Bulk index or delete documents. Performs multiple indexing or delete operations
|
|
646
|
+
in a single API call. This reduces overhead and can greatly increase indexing
|
|
647
|
+
speed.
|
|
645
648
|
|
|
646
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
649
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-bulk.html>`_
|
|
647
650
|
|
|
648
651
|
:param operations:
|
|
649
652
|
:param index: Name of the data stream, index, or index alias to perform bulk
|
|
@@ -740,9 +743,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
740
743
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
741
744
|
) -> ObjectApiResponse[t.Any]:
|
|
742
745
|
"""
|
|
743
|
-
|
|
746
|
+
Clear a scrolling search. Clear the search context and results for a scrolling
|
|
747
|
+
search.
|
|
744
748
|
|
|
745
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
749
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/clear-scroll-api.html>`_
|
|
746
750
|
|
|
747
751
|
:param scroll_id: Scroll IDs to clear. To clear all scroll IDs, use `_all`.
|
|
748
752
|
"""
|
|
@@ -790,9 +794,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
790
794
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
791
795
|
) -> ObjectApiResponse[t.Any]:
|
|
792
796
|
"""
|
|
793
|
-
|
|
797
|
+
Close a point in time. A point in time must be opened explicitly before being
|
|
798
|
+
used in search requests. The `keep_alive` parameter tells Elasticsearch how long
|
|
799
|
+
it should persist. A point in time is automatically closed when the `keep_alive`
|
|
800
|
+
period has elapsed. However, keeping points in time has a cost; close them as
|
|
801
|
+
soon as they are no longer required for search requests.
|
|
794
802
|
|
|
795
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
803
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
|
|
796
804
|
|
|
797
805
|
:param id: The ID of the point-in-time.
|
|
798
806
|
"""
|
|
@@ -866,7 +874,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
866
874
|
"""
|
|
867
875
|
Returns number of documents matching a query.
|
|
868
876
|
|
|
869
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
877
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-count.html>`_
|
|
870
878
|
|
|
871
879
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
872
880
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -997,11 +1005,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
997
1005
|
] = None,
|
|
998
1006
|
) -> ObjectApiResponse[t.Any]:
|
|
999
1007
|
"""
|
|
1000
|
-
Adds a JSON document to the specified data stream or index
|
|
1001
|
-
If the target is an index and the document already exists,
|
|
1002
|
-
the document and increments its version.
|
|
1008
|
+
Index a document. Adds a JSON document to the specified data stream or index
|
|
1009
|
+
and makes it searchable. If the target is an index and the document already exists,
|
|
1010
|
+
the request updates the document and increments its version.
|
|
1003
1011
|
|
|
1004
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1012
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-index_.html>`_
|
|
1005
1013
|
|
|
1006
1014
|
:param index: Name of the data stream or index to target. If the target doesn’t
|
|
1007
1015
|
exist and matches the name or wildcard (`*`) pattern of an index template
|
|
@@ -1103,9 +1111,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1103
1111
|
] = None,
|
|
1104
1112
|
) -> ObjectApiResponse[t.Any]:
|
|
1105
1113
|
"""
|
|
1106
|
-
Removes a JSON document from the specified index.
|
|
1114
|
+
Delete a document. Removes a JSON document from the specified index.
|
|
1107
1115
|
|
|
1108
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1116
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete.html>`_
|
|
1109
1117
|
|
|
1110
1118
|
:param index: Name of the target index.
|
|
1111
1119
|
:param id: Unique identifier for the document.
|
|
@@ -1225,9 +1233,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1225
1233
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1226
1234
|
) -> ObjectApiResponse[t.Any]:
|
|
1227
1235
|
"""
|
|
1228
|
-
Deletes documents that match the specified query.
|
|
1236
|
+
Delete documents. Deletes documents that match the specified query.
|
|
1229
1237
|
|
|
1230
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1238
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete-by-query.html>`_
|
|
1231
1239
|
|
|
1232
1240
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
1233
1241
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -1403,9 +1411,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1403
1411
|
requests_per_second: t.Optional[float] = None,
|
|
1404
1412
|
) -> ObjectApiResponse[t.Any]:
|
|
1405
1413
|
"""
|
|
1406
|
-
|
|
1414
|
+
Throttle a delete by query operation. Change the number of requests per second
|
|
1415
|
+
for a particular delete by query operation. Rethrottling that speeds up the query
|
|
1416
|
+
takes effect immediately but rethrotting that slows down the query takes effect
|
|
1417
|
+
after completing the current batch to prevent scroll timeouts.
|
|
1407
1418
|
|
|
1408
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1419
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete-by-query.html>`_
|
|
1409
1420
|
|
|
1410
1421
|
:param task_id: The ID for the task.
|
|
1411
1422
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -1449,9 +1460,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1449
1460
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1450
1461
|
) -> ObjectApiResponse[t.Any]:
|
|
1451
1462
|
"""
|
|
1452
|
-
Deletes a stored script or search template.
|
|
1463
|
+
Delete a script or search template. Deletes a stored script or search template.
|
|
1453
1464
|
|
|
1454
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1465
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
|
|
1455
1466
|
|
|
1456
1467
|
:param id: Identifier for the stored script or search template.
|
|
1457
1468
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -1517,9 +1528,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1517
1528
|
] = None,
|
|
1518
1529
|
) -> HeadApiResponse:
|
|
1519
1530
|
"""
|
|
1520
|
-
Checks if a document
|
|
1531
|
+
Check a document. Checks if a specified document exists.
|
|
1521
1532
|
|
|
1522
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1533
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
|
|
1523
1534
|
|
|
1524
1535
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1525
1536
|
wildcards (`*`).
|
|
@@ -1618,9 +1629,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1618
1629
|
] = None,
|
|
1619
1630
|
) -> HeadApiResponse:
|
|
1620
1631
|
"""
|
|
1621
|
-
Checks if a document's `_source` is stored.
|
|
1632
|
+
Check for a document source. Checks if a document's `_source` is stored.
|
|
1622
1633
|
|
|
1623
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1634
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
|
|
1624
1635
|
|
|
1625
1636
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1626
1637
|
wildcards (`*`).
|
|
@@ -1718,10 +1729,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1718
1729
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1719
1730
|
) -> ObjectApiResponse[t.Any]:
|
|
1720
1731
|
"""
|
|
1721
|
-
Returns information about why a specific document
|
|
1722
|
-
a query.
|
|
1732
|
+
Explain a document match result. Returns information about why a specific document
|
|
1733
|
+
matches, or doesn’t match, a query.
|
|
1723
1734
|
|
|
1724
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1735
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-explain.html>`_
|
|
1725
1736
|
|
|
1726
1737
|
:param index: Index names used to limit the request. Only a single index name
|
|
1727
1738
|
can be provided to this parameter.
|
|
@@ -1838,12 +1849,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1838
1849
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1839
1850
|
) -> ObjectApiResponse[t.Any]:
|
|
1840
1851
|
"""
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1852
|
+
Get the field capabilities. Get information about the capabilities of fields
|
|
1853
|
+
among multiple indices. For data streams, the API returns field capabilities
|
|
1854
|
+
among the stream’s backing indices. It returns runtime fields like any other
|
|
1855
|
+
field. For example, a runtime field with a type of keyword is returned the same
|
|
1856
|
+
as any other field that belongs to the `keyword` family.
|
|
1845
1857
|
|
|
1846
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1858
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-field-caps.html>`_
|
|
1847
1859
|
|
|
1848
1860
|
:param index: Comma-separated list of data streams, indices, and aliases used
|
|
1849
1861
|
to limit the request. Supports wildcards (*). To target all data streams
|
|
@@ -1957,9 +1969,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1957
1969
|
] = None,
|
|
1958
1970
|
) -> ObjectApiResponse[t.Any]:
|
|
1959
1971
|
"""
|
|
1960
|
-
|
|
1972
|
+
Get a document by its ID. Retrieves the document with the specified ID from an
|
|
1973
|
+
index.
|
|
1961
1974
|
|
|
1962
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1975
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
|
|
1963
1976
|
|
|
1964
1977
|
:param index: Name of the index that contains the document.
|
|
1965
1978
|
:param id: Unique identifier of the document.
|
|
@@ -2046,9 +2059,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2046
2059
|
pretty: t.Optional[bool] = None,
|
|
2047
2060
|
) -> ObjectApiResponse[t.Any]:
|
|
2048
2061
|
"""
|
|
2049
|
-
Retrieves a stored script or search template.
|
|
2062
|
+
Get a script or search template. Retrieves a stored script or search template.
|
|
2050
2063
|
|
|
2051
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2064
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
|
|
2052
2065
|
|
|
2053
2066
|
:param id: Identifier for the stored script or search template.
|
|
2054
2067
|
:param master_timeout: Specify timeout for connection to master
|
|
@@ -2088,9 +2101,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2088
2101
|
pretty: t.Optional[bool] = None,
|
|
2089
2102
|
) -> ObjectApiResponse[t.Any]:
|
|
2090
2103
|
"""
|
|
2091
|
-
|
|
2104
|
+
Get script contexts. Get a list of supported script contexts and their methods.
|
|
2092
2105
|
|
|
2093
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
2106
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.16/painless-contexts.html>`_
|
|
2094
2107
|
"""
|
|
2095
2108
|
__path_parts: t.Dict[str, str] = {}
|
|
2096
2109
|
__path = "/_script_context"
|
|
@@ -2123,9 +2136,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2123
2136
|
pretty: t.Optional[bool] = None,
|
|
2124
2137
|
) -> ObjectApiResponse[t.Any]:
|
|
2125
2138
|
"""
|
|
2126
|
-
|
|
2139
|
+
Get script languages. Get a list of available script types, languages, and contexts.
|
|
2127
2140
|
|
|
2128
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2141
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
|
|
2129
2142
|
"""
|
|
2130
2143
|
__path_parts: t.Dict[str, str] = {}
|
|
2131
2144
|
__path = "/_script_language"
|
|
@@ -2178,9 +2191,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2178
2191
|
] = None,
|
|
2179
2192
|
) -> ObjectApiResponse[t.Any]:
|
|
2180
2193
|
"""
|
|
2181
|
-
Returns the source of a document.
|
|
2194
|
+
Get a document's source. Returns the source of a document.
|
|
2182
2195
|
|
|
2183
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2196
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html>`_
|
|
2184
2197
|
|
|
2185
2198
|
:param index: Name of the index that contains the document.
|
|
2186
2199
|
:param id: Unique identifier of the document.
|
|
@@ -2263,7 +2276,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2263
2276
|
"""
|
|
2264
2277
|
Returns the health of the cluster.
|
|
2265
2278
|
|
|
2266
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2279
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/health-api.html>`_
|
|
2267
2280
|
|
|
2268
2281
|
:param feature: A feature of the cluster, as returned by the top-level health
|
|
2269
2282
|
report API.
|
|
@@ -2336,11 +2349,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2336
2349
|
] = None,
|
|
2337
2350
|
) -> ObjectApiResponse[t.Any]:
|
|
2338
2351
|
"""
|
|
2339
|
-
Adds a JSON document to the specified data stream or index
|
|
2340
|
-
If the target is an index and the document already exists,
|
|
2341
|
-
the document and increments its version.
|
|
2352
|
+
Index a document. Adds a JSON document to the specified data stream or index
|
|
2353
|
+
and makes it searchable. If the target is an index and the document already exists,
|
|
2354
|
+
the request updates the document and increments its version.
|
|
2342
2355
|
|
|
2343
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2356
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-index_.html>`_
|
|
2344
2357
|
|
|
2345
2358
|
:param index: Name of the data stream or index to target.
|
|
2346
2359
|
:param document:
|
|
@@ -2447,9 +2460,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2447
2460
|
pretty: t.Optional[bool] = None,
|
|
2448
2461
|
) -> ObjectApiResponse[t.Any]:
|
|
2449
2462
|
"""
|
|
2450
|
-
Returns basic information about the cluster.
|
|
2463
|
+
Get cluster info. Returns basic information about the cluster.
|
|
2451
2464
|
|
|
2452
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2465
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/index.html>`_
|
|
2453
2466
|
"""
|
|
2454
2467
|
__path_parts: t.Dict[str, str] = {}
|
|
2455
2468
|
__path = "/"
|
|
@@ -2483,6 +2496,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2483
2496
|
),
|
|
2484
2497
|
parameter_aliases={"_source": "source"},
|
|
2485
2498
|
)
|
|
2499
|
+
@_stability_warning(Stability.EXPERIMENTAL)
|
|
2486
2500
|
async def knn_search(
|
|
2487
2501
|
self,
|
|
2488
2502
|
*,
|
|
@@ -2503,9 +2517,17 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2503
2517
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2504
2518
|
) -> ObjectApiResponse[t.Any]:
|
|
2505
2519
|
"""
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2520
|
+
Run a knn search. NOTE: The kNN search API has been replaced by the `knn` option
|
|
2521
|
+
in the search API. Perform a k-nearest neighbor (kNN) search on a dense_vector
|
|
2522
|
+
field and return the matching documents. Given a query vector, the API finds
|
|
2523
|
+
the k closest vectors and returns those documents as search hits. Elasticsearch
|
|
2524
|
+
uses the HNSW algorithm to support efficient kNN search. Like most kNN algorithms,
|
|
2525
|
+
HNSW is an approximate method that sacrifices result accuracy for improved search
|
|
2526
|
+
speed. This means the results returned are not always the true k closest neighbors.
|
|
2527
|
+
The kNN search API supports restricting the search using a filter. The search
|
|
2528
|
+
will return the top k documents that also match the filter query.
|
|
2529
|
+
|
|
2530
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
|
|
2509
2531
|
|
|
2510
2532
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
2511
2533
|
to perform the operation on all indices
|
|
@@ -2604,9 +2626,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2604
2626
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2605
2627
|
) -> ObjectApiResponse[t.Any]:
|
|
2606
2628
|
"""
|
|
2607
|
-
|
|
2629
|
+
Get multiple documents. Get multiple JSON documents by ID from one or more indices.
|
|
2630
|
+
If you specify an index in the request URI, you only need to specify the document
|
|
2631
|
+
IDs in the request body. To ensure fast responses, this multi get (mget) API
|
|
2632
|
+
responds with partial results if one or more shards fail.
|
|
2608
2633
|
|
|
2609
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2634
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-multi-get.html>`_
|
|
2610
2635
|
|
|
2611
2636
|
:param index: Name of the index to retrieve documents from when `ids` are specified,
|
|
2612
2637
|
or when a document in the `docs` array does not specify an index.
|
|
@@ -2725,9 +2750,15 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2725
2750
|
typed_keys: t.Optional[bool] = None,
|
|
2726
2751
|
) -> ObjectApiResponse[t.Any]:
|
|
2727
2752
|
"""
|
|
2728
|
-
|
|
2753
|
+
Run multiple searches. The format of the request is similar to the bulk API format
|
|
2754
|
+
and makes use of the newline delimited JSON (NDJSON) format. The structure is
|
|
2755
|
+
as follows: ``` header\\n body\\n header\\n body\\n ``` This structure is specifically
|
|
2756
|
+
optimized to reduce parsing if a specific search ends up redirected to another
|
|
2757
|
+
node. IMPORTANT: The final line of data must end with a newline character `\\n`.
|
|
2758
|
+
Each newline character may be preceded by a carriage return `\\r`. When sending
|
|
2759
|
+
requests to this endpoint the `Content-Type` header should be set to `application/x-ndjson`.
|
|
2729
2760
|
|
|
2730
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2761
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
|
|
2731
2762
|
|
|
2732
2763
|
:param searches:
|
|
2733
2764
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
@@ -2857,9 +2888,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2857
2888
|
typed_keys: t.Optional[bool] = None,
|
|
2858
2889
|
) -> ObjectApiResponse[t.Any]:
|
|
2859
2890
|
"""
|
|
2860
|
-
|
|
2891
|
+
Run multiple templated searches.
|
|
2861
2892
|
|
|
2862
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2893
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
|
|
2863
2894
|
|
|
2864
2895
|
:param search_templates:
|
|
2865
2896
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
@@ -2952,9 +2983,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2952
2983
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2953
2984
|
) -> ObjectApiResponse[t.Any]:
|
|
2954
2985
|
"""
|
|
2955
|
-
|
|
2986
|
+
Get multiple term vectors. You can specify existing documents by index and ID
|
|
2987
|
+
or provide artificial documents in the body of the request. You can specify the
|
|
2988
|
+
index in the request body or request URI. The response contains a `docs` array
|
|
2989
|
+
with all the fetched termvectors. Each element has the structure provided by
|
|
2990
|
+
the termvectors API.
|
|
2956
2991
|
|
|
2957
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2992
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-multi-termvectors.html>`_
|
|
2958
2993
|
|
|
2959
2994
|
:param index: Name of the index that contains the documents.
|
|
2960
2995
|
:param docs: Array of existing or artificial documents.
|
|
@@ -3036,7 +3071,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3036
3071
|
path_parts=__path_parts,
|
|
3037
3072
|
)
|
|
3038
3073
|
|
|
3039
|
-
@_rewrite_parameters(
|
|
3074
|
+
@_rewrite_parameters(
|
|
3075
|
+
body_fields=("index_filter",),
|
|
3076
|
+
)
|
|
3040
3077
|
async def open_point_in_time(
|
|
3041
3078
|
self,
|
|
3042
3079
|
*,
|
|
@@ -3054,20 +3091,24 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3054
3091
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3055
3092
|
human: t.Optional[bool] = None,
|
|
3056
3093
|
ignore_unavailable: t.Optional[bool] = None,
|
|
3094
|
+
index_filter: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3057
3095
|
preference: t.Optional[str] = None,
|
|
3058
3096
|
pretty: t.Optional[bool] = None,
|
|
3059
3097
|
routing: t.Optional[str] = None,
|
|
3098
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3060
3099
|
) -> ObjectApiResponse[t.Any]:
|
|
3061
3100
|
"""
|
|
3062
|
-
A search request by default
|
|
3063
|
-
the target indices, which is called point in time. Elasticsearch
|
|
3064
|
-
time) is a lightweight view into the state of the data as it existed
|
|
3065
|
-
In some cases, it’s preferred to perform multiple search requests
|
|
3066
|
-
point in time. For example, if refreshes happen between `search_after`
|
|
3067
|
-
then the results of those requests might not be consistent as changes
|
|
3068
|
-
between searches are only visible to the more recent point in time.
|
|
3069
|
-
|
|
3070
|
-
|
|
3101
|
+
Open a point in time. A search request by default runs against the most recent
|
|
3102
|
+
visible data of the target indices, which is called point in time. Elasticsearch
|
|
3103
|
+
pit (point in time) is a lightweight view into the state of the data as it existed
|
|
3104
|
+
when initiated. In some cases, it’s preferred to perform multiple search requests
|
|
3105
|
+
using the same point in time. For example, if refreshes happen between `search_after`
|
|
3106
|
+
requests, then the results of those requests might not be consistent as changes
|
|
3107
|
+
happening between searches are only visible to the more recent point in time.
|
|
3108
|
+
A point in time must be opened explicitly before being used in search requests.
|
|
3109
|
+
The `keep_alive` parameter tells Elasticsearch how long it should persist.
|
|
3110
|
+
|
|
3111
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
|
|
3071
3112
|
|
|
3072
3113
|
:param index: A comma-separated list of index names to open point in time; use
|
|
3073
3114
|
`_all` or empty string to perform the operation on all indices
|
|
@@ -3078,17 +3119,20 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3078
3119
|
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
|
|
3079
3120
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
3080
3121
|
a missing or closed index.
|
|
3122
|
+
:param index_filter: Allows to filter indices if the provided query rewrites
|
|
3123
|
+
to `match_none` on every shard.
|
|
3081
3124
|
:param preference: Specifies the node or shard the operation should be performed
|
|
3082
3125
|
on. Random by default.
|
|
3083
3126
|
:param routing: Custom value used to route operations to a specific shard.
|
|
3084
3127
|
"""
|
|
3085
3128
|
if index in SKIP_IN_PATH:
|
|
3086
3129
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
3087
|
-
if keep_alive is None:
|
|
3130
|
+
if keep_alive is None and body is None:
|
|
3088
3131
|
raise ValueError("Empty value passed for parameter 'keep_alive'")
|
|
3089
3132
|
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
3090
3133
|
__path = f'/{__path_parts["index"]}/_pit'
|
|
3091
3134
|
__query: t.Dict[str, t.Any] = {}
|
|
3135
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
3092
3136
|
if keep_alive is not None:
|
|
3093
3137
|
__query["keep_alive"] = keep_alive
|
|
3094
3138
|
if error_trace is not None:
|
|
@@ -3107,12 +3151,20 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3107
3151
|
__query["pretty"] = pretty
|
|
3108
3152
|
if routing is not None:
|
|
3109
3153
|
__query["routing"] = routing
|
|
3154
|
+
if not __body:
|
|
3155
|
+
if index_filter is not None:
|
|
3156
|
+
__body["index_filter"] = index_filter
|
|
3157
|
+
if not __body:
|
|
3158
|
+
__body = None # type: ignore[assignment]
|
|
3110
3159
|
__headers = {"accept": "application/json"}
|
|
3160
|
+
if __body is not None:
|
|
3161
|
+
__headers["content-type"] = "application/json"
|
|
3111
3162
|
return await self.perform_request( # type: ignore[return-value]
|
|
3112
3163
|
"POST",
|
|
3113
3164
|
__path,
|
|
3114
3165
|
params=__query,
|
|
3115
3166
|
headers=__headers,
|
|
3167
|
+
body=__body,
|
|
3116
3168
|
endpoint_id="open_point_in_time",
|
|
3117
3169
|
path_parts=__path_parts,
|
|
3118
3170
|
)
|
|
@@ -3135,9 +3187,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3135
3187
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3136
3188
|
) -> ObjectApiResponse[t.Any]:
|
|
3137
3189
|
"""
|
|
3138
|
-
|
|
3190
|
+
Create or update a script or search template. Creates or updates a stored script
|
|
3191
|
+
or search template.
|
|
3139
3192
|
|
|
3140
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3193
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html>`_
|
|
3141
3194
|
|
|
3142
3195
|
:param id: Identifier for the stored script or search template. Must be unique
|
|
3143
3196
|
within the cluster.
|
|
@@ -3220,10 +3273,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3220
3273
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3221
3274
|
) -> ObjectApiResponse[t.Any]:
|
|
3222
3275
|
"""
|
|
3223
|
-
|
|
3224
|
-
search queries.
|
|
3276
|
+
Evaluate ranked search results. Evaluate the quality of ranked search results
|
|
3277
|
+
over a set of typical search queries.
|
|
3225
3278
|
|
|
3226
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3279
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-rank-eval.html>`_
|
|
3227
3280
|
|
|
3228
3281
|
:param requests: A set of typical search requests, together with their provided
|
|
3229
3282
|
ratings.
|
|
@@ -3315,11 +3368,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3315
3368
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3316
3369
|
) -> ObjectApiResponse[t.Any]:
|
|
3317
3370
|
"""
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
the
|
|
3371
|
+
Reindex documents. Copies documents from a source to a destination. The source
|
|
3372
|
+
can be any existing index, alias, or data stream. The destination must differ
|
|
3373
|
+
from the source. For example, you cannot reindex a data stream into itself.
|
|
3321
3374
|
|
|
3322
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3375
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-reindex.html>`_
|
|
3323
3376
|
|
|
3324
3377
|
:param dest: The destination you are copying to.
|
|
3325
3378
|
:param source: The source you are copying from.
|
|
@@ -3413,9 +3466,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3413
3466
|
requests_per_second: t.Optional[float] = None,
|
|
3414
3467
|
) -> ObjectApiResponse[t.Any]:
|
|
3415
3468
|
"""
|
|
3416
|
-
|
|
3469
|
+
Throttle a reindex operation. Change the number of requests per second for a
|
|
3470
|
+
particular reindex operation.
|
|
3417
3471
|
|
|
3418
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3472
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-reindex.html>`_
|
|
3419
3473
|
|
|
3420
3474
|
:param task_id: Identifier for the task.
|
|
3421
3475
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -3464,9 +3518,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3464
3518
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3465
3519
|
) -> ObjectApiResponse[t.Any]:
|
|
3466
3520
|
"""
|
|
3467
|
-
|
|
3521
|
+
Render a search template. Render a search template as a search request body.
|
|
3468
3522
|
|
|
3469
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3523
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/render-search-template-api.html>`_
|
|
3470
3524
|
|
|
3471
3525
|
:param id: ID of the search template to render. If no `source` is specified,
|
|
3472
3526
|
this or the `id` request body parameter is required.
|
|
@@ -3519,6 +3573,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3519
3573
|
@_rewrite_parameters(
|
|
3520
3574
|
body_fields=("context", "context_setup", "script"),
|
|
3521
3575
|
)
|
|
3576
|
+
@_stability_warning(Stability.EXPERIMENTAL)
|
|
3522
3577
|
async def scripts_painless_execute(
|
|
3523
3578
|
self,
|
|
3524
3579
|
*,
|
|
@@ -3532,9 +3587,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3532
3587
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3533
3588
|
) -> ObjectApiResponse[t.Any]:
|
|
3534
3589
|
"""
|
|
3535
|
-
Runs a script and returns a result.
|
|
3590
|
+
Run a script. Runs a script and returns a result.
|
|
3536
3591
|
|
|
3537
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
3592
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.16/painless-execute-api.html>`_
|
|
3538
3593
|
|
|
3539
3594
|
:param context: The context that the script should run in.
|
|
3540
3595
|
:param context_setup: Additional parameters for the `context`.
|
|
@@ -3590,9 +3645,24 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3590
3645
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3591
3646
|
) -> ObjectApiResponse[t.Any]:
|
|
3592
3647
|
"""
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3648
|
+
Run a scrolling search. IMPORTANT: The scroll API is no longer recommend for
|
|
3649
|
+
deep pagination. If you need to preserve the index state while paging through
|
|
3650
|
+
more than 10,000 hits, use the `search_after` parameter with a point in time
|
|
3651
|
+
(PIT). The scroll API gets large sets of results from a single scrolling search
|
|
3652
|
+
request. To get the necessary scroll ID, submit a search API request that includes
|
|
3653
|
+
an argument for the `scroll` query parameter. The `scroll` parameter indicates
|
|
3654
|
+
how long Elasticsearch should retain the search context for the request. The
|
|
3655
|
+
search response returns a scroll ID in the `_scroll_id` response body parameter.
|
|
3656
|
+
You can then use the scroll ID with the scroll API to retrieve the next batch
|
|
3657
|
+
of results for the request. If the Elasticsearch security features are enabled,
|
|
3658
|
+
the access to the results of a specific scroll ID is restricted to the user or
|
|
3659
|
+
API key that submitted the search. You can also use the scroll API to specify
|
|
3660
|
+
a new scroll parameter that extends or shortens the retention period for the
|
|
3661
|
+
search context. IMPORTANT: Results from a scrolling search reflect the state
|
|
3662
|
+
of the index at the time of the initial search request. Subsequent indexing or
|
|
3663
|
+
document changes only affect later search and scroll requests.
|
|
3664
|
+
|
|
3665
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-request-body.html#request-body-search-scroll>`_
|
|
3596
3666
|
|
|
3597
3667
|
:param scroll_id: Scroll ID of the search.
|
|
3598
3668
|
:param rest_total_hits_as_int: If true, the API response’s hit.total property
|
|
@@ -3780,11 +3850,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3780
3850
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3781
3851
|
) -> ObjectApiResponse[t.Any]:
|
|
3782
3852
|
"""
|
|
3783
|
-
|
|
3784
|
-
search queries using the `q` query string parameter or the request
|
|
3785
|
-
are specified, only the query parameter is used.
|
|
3853
|
+
Run a search. Get search hits that match the query defined in the request. You
|
|
3854
|
+
can provide search queries using the `q` query string parameter or the request
|
|
3855
|
+
body. If both are specified, only the query parameter is used.
|
|
3786
3856
|
|
|
3787
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3857
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
|
|
3788
3858
|
|
|
3789
3859
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
3790
3860
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -4212,10 +4282,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4212
4282
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4213
4283
|
) -> BinaryApiResponse:
|
|
4214
4284
|
"""
|
|
4215
|
-
|
|
4216
|
-
vector tile.
|
|
4285
|
+
Search a vector tile. Search a vector tile for geospatial values.
|
|
4217
4286
|
|
|
4218
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4287
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-vector-tile-api.html>`_
|
|
4219
4288
|
|
|
4220
4289
|
:param index: Comma-separated list of data streams, indices, or aliases to search
|
|
4221
4290
|
:param field: Field containing geospatial data to return
|
|
@@ -4367,10 +4436,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4367
4436
|
routing: t.Optional[str] = None,
|
|
4368
4437
|
) -> ObjectApiResponse[t.Any]:
|
|
4369
4438
|
"""
|
|
4370
|
-
|
|
4371
|
-
be
|
|
4439
|
+
Get the search shards. Get the indices and shards that a search request would
|
|
4440
|
+
be run against. This information can be useful for working out issues or planning
|
|
4441
|
+
optimizations with routing and shard preferences. When filtered aliases are used,
|
|
4442
|
+
the filter is returned as part of the indices section.
|
|
4372
4443
|
|
|
4373
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4444
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-shards.html>`_
|
|
4374
4445
|
|
|
4375
4446
|
:param index: Returns the indices and shards that a search request would be executed
|
|
4376
4447
|
against.
|
|
@@ -4469,9 +4540,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4469
4540
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4470
4541
|
) -> ObjectApiResponse[t.Any]:
|
|
4471
4542
|
"""
|
|
4472
|
-
|
|
4543
|
+
Run a search with a search template.
|
|
4473
4544
|
|
|
4474
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4545
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-template.html>`_
|
|
4475
4546
|
|
|
4476
4547
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
4477
4548
|
Supports wildcards (*).
|
|
@@ -4601,11 +4672,17 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4601
4672
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4602
4673
|
) -> ObjectApiResponse[t.Any]:
|
|
4603
4674
|
"""
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
scenarios.
|
|
4607
|
-
|
|
4608
|
-
|
|
4675
|
+
Get terms in an index. Discover terms that match a partial string in an index.
|
|
4676
|
+
This "terms enum" API is designed for low-latency look-ups used in auto-complete
|
|
4677
|
+
scenarios. If the `complete` property in the response is false, the returned
|
|
4678
|
+
terms set may be incomplete and should be treated as approximate. This can occur
|
|
4679
|
+
due to a few reasons, such as a request timeout or a node error. NOTE: The terms
|
|
4680
|
+
enum API may return terms from deleted documents. Deleted documents are initially
|
|
4681
|
+
only marked as deleted. It is not until their segments are merged that documents
|
|
4682
|
+
are actually deleted. Until that happens, the terms enum API will return terms
|
|
4683
|
+
from these documents.
|
|
4684
|
+
|
|
4685
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-terms-enum.html>`_
|
|
4609
4686
|
|
|
4610
4687
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
4611
4688
|
to search. Wildcard (*) expressions are supported.
|
|
@@ -4701,10 +4778,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4701
4778
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4702
4779
|
) -> ObjectApiResponse[t.Any]:
|
|
4703
4780
|
"""
|
|
4704
|
-
|
|
4705
|
-
document.
|
|
4781
|
+
Get term vector information. Get information and statistics about terms in the
|
|
4782
|
+
fields of a particular document.
|
|
4706
4783
|
|
|
4707
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4784
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-termvectors.html>`_
|
|
4708
4785
|
|
|
4709
4786
|
:param index: Name of the index that contains the document.
|
|
4710
4787
|
:param id: Unique identifier of the document.
|
|
@@ -4844,9 +4921,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4844
4921
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4845
4922
|
) -> ObjectApiResponse[t.Any]:
|
|
4846
4923
|
"""
|
|
4847
|
-
Updates a document
|
|
4924
|
+
Update a document. Updates a document by running a script or passing a partial
|
|
4925
|
+
document.
|
|
4848
4926
|
|
|
4849
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4927
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-update.html>`_
|
|
4850
4928
|
|
|
4851
4929
|
:param index: The name of the index
|
|
4852
4930
|
:param id: Document ID
|
|
@@ -4980,6 +5058,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4980
5058
|
pipeline: t.Optional[str] = None,
|
|
4981
5059
|
preference: t.Optional[str] = None,
|
|
4982
5060
|
pretty: t.Optional[bool] = None,
|
|
5061
|
+
q: t.Optional[str] = None,
|
|
4983
5062
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4984
5063
|
refresh: t.Optional[bool] = None,
|
|
4985
5064
|
request_cache: t.Optional[bool] = None,
|
|
@@ -5007,11 +5086,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5007
5086
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
5008
5087
|
) -> ObjectApiResponse[t.Any]:
|
|
5009
5088
|
"""
|
|
5010
|
-
Updates documents that match the specified query. If no query
|
|
5011
|
-
an update on every document in the data stream or index
|
|
5012
|
-
source, which is useful for picking up mapping changes.
|
|
5089
|
+
Update documents. Updates documents that match the specified query. If no query
|
|
5090
|
+
is specified, performs an update on every document in the data stream or index
|
|
5091
|
+
without modifying the source, which is useful for picking up mapping changes.
|
|
5013
5092
|
|
|
5014
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5093
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-update-by-query.html>`_
|
|
5015
5094
|
|
|
5016
5095
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
5017
5096
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -5046,6 +5125,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5046
5125
|
parameter.
|
|
5047
5126
|
:param preference: Specifies the node or shard the operation should be performed
|
|
5048
5127
|
on. Random by default.
|
|
5128
|
+
:param q: Query in the Lucene query string syntax.
|
|
5049
5129
|
:param query: Specifies the documents to update using the Query DSL.
|
|
5050
5130
|
:param refresh: If `true`, Elasticsearch refreshes affected shards to make the
|
|
5051
5131
|
operation visible to search.
|
|
@@ -5130,6 +5210,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5130
5210
|
__query["preference"] = preference
|
|
5131
5211
|
if pretty is not None:
|
|
5132
5212
|
__query["pretty"] = pretty
|
|
5213
|
+
if q is not None:
|
|
5214
|
+
__query["q"] = q
|
|
5133
5215
|
if refresh is not None:
|
|
5134
5216
|
__query["refresh"] = refresh
|
|
5135
5217
|
if request_cache is not None:
|
|
@@ -5202,9 +5284,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5202
5284
|
requests_per_second: t.Optional[float] = None,
|
|
5203
5285
|
) -> ObjectApiResponse[t.Any]:
|
|
5204
5286
|
"""
|
|
5205
|
-
|
|
5287
|
+
Throttle an update by query operation. Change the number of requests per second
|
|
5288
|
+
for a particular update by query operation. Rethrottling that speeds up the query
|
|
5289
|
+
takes effect immediately but rethrotting that slows down the query takes effect
|
|
5290
|
+
after completing the current batch to prevent scroll timeouts.
|
|
5206
5291
|
|
|
5207
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5292
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-update-by-query.html>`_
|
|
5208
5293
|
|
|
5209
5294
|
:param task_id: The ID for the task.
|
|
5210
5295
|
:param requests_per_second: The throttle for this request in sub-requests per
|