elasticsearch 8.13.2__py3-none-any.whl → 8.15.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 +204 -169
- elasticsearch/_async/client/async_search.py +35 -20
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +785 -180
- elasticsearch/_async/client/ccr.py +20 -32
- elasticsearch/_async/client/cluster.py +94 -88
- elasticsearch/_async/client/connector.py +1470 -0
- elasticsearch/_async/client/dangling_indices.py +7 -11
- elasticsearch/_async/client/enrich.py +8 -8
- elasticsearch/_async/client/eql.py +17 -16
- elasticsearch/_async/client/esql.py +2 -2
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +18 -17
- elasticsearch/_async/client/graph.py +4 -4
- elasticsearch/_async/client/ilm.py +36 -44
- elasticsearch/_async/client/indices.py +401 -411
- elasticsearch/_async/client/inference.py +65 -39
- elasticsearch/_async/client/ingest.py +22 -23
- elasticsearch/_async/client/license.py +18 -10
- elasticsearch/_async/client/logstash.py +6 -6
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +383 -176
- elasticsearch/_async/client/monitoring.py +2 -2
- elasticsearch/_async/client/nodes.py +32 -32
- elasticsearch/_async/client/query_rules.py +384 -0
- elasticsearch/_async/client/rollup.py +13 -13
- elasticsearch/_async/client/search_application.py +15 -10
- elasticsearch/_async/client/searchable_snapshots.py +9 -13
- elasticsearch/_async/client/security.py +587 -104
- elasticsearch/_async/client/shutdown.py +7 -7
- elasticsearch/_async/client/slm.py +11 -13
- elasticsearch/_async/client/snapshot.py +39 -52
- elasticsearch/_async/client/sql.py +12 -14
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +8 -8
- elasticsearch/_async/client/tasks.py +9 -10
- elasticsearch/_async/client/text_structure.py +3 -3
- elasticsearch/_async/client/transform.py +89 -34
- elasticsearch/_async/client/watcher.py +30 -15
- elasticsearch/_async/client/xpack.py +6 -7
- elasticsearch/_otel.py +2 -6
- elasticsearch/_sync/client/__init__.py +204 -169
- elasticsearch/_sync/client/async_search.py +35 -20
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +785 -180
- elasticsearch/_sync/client/ccr.py +20 -32
- elasticsearch/_sync/client/cluster.py +94 -88
- elasticsearch/_sync/client/connector.py +1470 -0
- elasticsearch/_sync/client/dangling_indices.py +7 -11
- elasticsearch/_sync/client/enrich.py +8 -8
- elasticsearch/_sync/client/eql.py +17 -16
- elasticsearch/_sync/client/esql.py +2 -2
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +18 -17
- elasticsearch/_sync/client/graph.py +4 -4
- elasticsearch/_sync/client/ilm.py +36 -44
- elasticsearch/_sync/client/indices.py +401 -411
- elasticsearch/_sync/client/inference.py +65 -39
- elasticsearch/_sync/client/ingest.py +22 -23
- elasticsearch/_sync/client/license.py +18 -10
- elasticsearch/_sync/client/logstash.py +6 -6
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +383 -176
- elasticsearch/_sync/client/monitoring.py +2 -2
- elasticsearch/_sync/client/nodes.py +32 -32
- elasticsearch/_sync/client/query_rules.py +384 -0
- elasticsearch/_sync/client/rollup.py +13 -13
- elasticsearch/_sync/client/search_application.py +15 -10
- elasticsearch/_sync/client/searchable_snapshots.py +9 -13
- elasticsearch/_sync/client/security.py +587 -104
- elasticsearch/_sync/client/shutdown.py +7 -7
- elasticsearch/_sync/client/slm.py +11 -13
- elasticsearch/_sync/client/snapshot.py +39 -52
- elasticsearch/_sync/client/sql.py +12 -14
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +8 -8
- elasticsearch/_sync/client/tasks.py +9 -10
- elasticsearch/_sync/client/text_structure.py +3 -3
- elasticsearch/_sync/client/transform.py +89 -34
- elasticsearch/_sync/client/watcher.py +30 -15
- elasticsearch/_sync/client/xpack.py +6 -7
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +36 -6
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +36 -6
- elasticsearch/serializer.py +34 -1
- elasticsearch-8.15.0.dist-info/METADATA +177 -0
- elasticsearch-8.15.0.dist-info/RECORD +117 -0
- {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info}/WHEEL +1 -2
- elasticsearch/_async/client/query_ruleset.py +0 -205
- elasticsearch/_sync/client/query_ruleset.py +0 -205
- elasticsearch-8.13.2.dist-info/METADATA +0 -147
- elasticsearch-8.13.2.dist-info/RECORD +0 -116
- elasticsearch-8.13.2.dist-info/top_level.txt +0 -1
- {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/LICENSE +0 -0
- {elasticsearch-8.13.2.dist-info → elasticsearch-8.15.0.dist-info/licenses}/NOTICE +0 -0
|
@@ -46,6 +46,7 @@ from .autoscaling import AutoscalingClient
|
|
|
46
46
|
from .cat import CatClient
|
|
47
47
|
from .ccr import CcrClient
|
|
48
48
|
from .cluster import ClusterClient
|
|
49
|
+
from .connector import ConnectorClient
|
|
49
50
|
from .dangling_indices import DanglingIndicesClient
|
|
50
51
|
from .enrich import EnrichClient
|
|
51
52
|
from .eql import EqlClient
|
|
@@ -63,7 +64,7 @@ from .migration import MigrationClient
|
|
|
63
64
|
from .ml import MlClient
|
|
64
65
|
from .monitoring import MonitoringClient
|
|
65
66
|
from .nodes import NodesClient
|
|
66
|
-
from .
|
|
67
|
+
from .query_rules import QueryRulesClient
|
|
67
68
|
from .rollup import RollupClient
|
|
68
69
|
from .search_application import SearchApplicationClient
|
|
69
70
|
from .searchable_snapshots import SearchableSnapshotsClient
|
|
@@ -352,7 +353,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
352
353
|
if node_class is not DEFAULT:
|
|
353
354
|
transport_kwargs["node_class"] = node_class
|
|
354
355
|
if node_pool_class is not DEFAULT:
|
|
355
|
-
transport_kwargs["node_pool_class"] =
|
|
356
|
+
transport_kwargs["node_pool_class"] = node_pool_class
|
|
356
357
|
if randomize_nodes_in_pool is not DEFAULT:
|
|
357
358
|
transport_kwargs["randomize_nodes_in_pool"] = randomize_nodes_in_pool
|
|
358
359
|
if node_selector_class is not DEFAULT:
|
|
@@ -433,6 +434,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
433
434
|
self.autoscaling = AutoscalingClient(self)
|
|
434
435
|
self.cat = CatClient(self)
|
|
435
436
|
self.cluster = ClusterClient(self)
|
|
437
|
+
self.connector = ConnectorClient(self)
|
|
436
438
|
self.fleet = FleetClient(self)
|
|
437
439
|
self.features = FeaturesClient(self)
|
|
438
440
|
self.indices = IndicesClient(self)
|
|
@@ -455,7 +457,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
455
457
|
self.migration = MigrationClient(self)
|
|
456
458
|
self.ml = MlClient(self)
|
|
457
459
|
self.monitoring = MonitoringClient(self)
|
|
458
|
-
self.
|
|
460
|
+
self.query_rules = QueryRulesClient(self)
|
|
459
461
|
self.rollup = RollupClient(self)
|
|
460
462
|
self.search_application = SearchApplicationClient(self)
|
|
461
463
|
self.searchable_snapshots = SearchableSnapshotsClient(self)
|
|
@@ -625,22 +627,23 @@ class AsyncElasticsearch(BaseClient):
|
|
|
625
627
|
pipeline: t.Optional[str] = None,
|
|
626
628
|
pretty: t.Optional[bool] = None,
|
|
627
629
|
refresh: t.Optional[
|
|
628
|
-
t.Union[
|
|
630
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
629
631
|
] = None,
|
|
630
632
|
require_alias: t.Optional[bool] = None,
|
|
631
633
|
routing: t.Optional[str] = None,
|
|
632
634
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
633
635
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
634
636
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
635
|
-
timeout: t.Optional[t.Union[
|
|
637
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
636
638
|
wait_for_active_shards: t.Optional[
|
|
637
|
-
t.Union[int, t.Union[
|
|
639
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
638
640
|
] = None,
|
|
639
641
|
) -> ObjectApiResponse[t.Any]:
|
|
640
642
|
"""
|
|
641
|
-
|
|
643
|
+
Performs multiple indexing or delete operations in a single API call. This reduces
|
|
644
|
+
overhead and can greatly increase indexing speed.
|
|
642
645
|
|
|
643
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
646
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-bulk.html>`_
|
|
644
647
|
|
|
645
648
|
:param operations:
|
|
646
649
|
:param index: Name of the data stream, index, or index alias to perform bulk
|
|
@@ -737,9 +740,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
737
740
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
738
741
|
) -> ObjectApiResponse[t.Any]:
|
|
739
742
|
"""
|
|
740
|
-
|
|
743
|
+
Clears the search context and results for a scrolling search.
|
|
741
744
|
|
|
742
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
745
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/clear-scroll-api.html>`_
|
|
743
746
|
|
|
744
747
|
:param scroll_id: Scroll IDs to clear. To clear all scroll IDs, use `_all`.
|
|
745
748
|
"""
|
|
@@ -787,9 +790,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
787
790
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
788
791
|
) -> ObjectApiResponse[t.Any]:
|
|
789
792
|
"""
|
|
790
|
-
|
|
793
|
+
Closes a point-in-time.
|
|
791
794
|
|
|
792
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
795
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/point-in-time-api.html>`_
|
|
793
796
|
|
|
794
797
|
:param id: The ID of the point-in-time.
|
|
795
798
|
"""
|
|
@@ -835,15 +838,15 @@ class AsyncElasticsearch(BaseClient):
|
|
|
835
838
|
allow_no_indices: t.Optional[bool] = None,
|
|
836
839
|
analyze_wildcard: t.Optional[bool] = None,
|
|
837
840
|
analyzer: t.Optional[str] = None,
|
|
838
|
-
default_operator: t.Optional[t.Union[
|
|
841
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
839
842
|
df: t.Optional[str] = None,
|
|
840
843
|
error_trace: t.Optional[bool] = None,
|
|
841
844
|
expand_wildcards: t.Optional[
|
|
842
845
|
t.Union[
|
|
843
846
|
t.Sequence[
|
|
844
|
-
t.Union[
|
|
847
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
845
848
|
],
|
|
846
|
-
t.Union[
|
|
849
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
847
850
|
]
|
|
848
851
|
] = None,
|
|
849
852
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -863,7 +866,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
863
866
|
"""
|
|
864
867
|
Returns number of documents matching a query.
|
|
865
868
|
|
|
866
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
869
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-count.html>`_
|
|
867
870
|
|
|
868
871
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
869
872
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -981,23 +984,24 @@ class AsyncElasticsearch(BaseClient):
|
|
|
981
984
|
pipeline: t.Optional[str] = None,
|
|
982
985
|
pretty: t.Optional[bool] = None,
|
|
983
986
|
refresh: t.Optional[
|
|
984
|
-
t.Union[
|
|
987
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
985
988
|
] = None,
|
|
986
989
|
routing: t.Optional[str] = None,
|
|
987
|
-
timeout: t.Optional[t.Union[
|
|
990
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
988
991
|
version: t.Optional[int] = None,
|
|
989
992
|
version_type: t.Optional[
|
|
990
|
-
t.Union[
|
|
993
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
991
994
|
] = None,
|
|
992
995
|
wait_for_active_shards: t.Optional[
|
|
993
|
-
t.Union[int, t.Union[
|
|
996
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
994
997
|
] = None,
|
|
995
998
|
) -> ObjectApiResponse[t.Any]:
|
|
996
999
|
"""
|
|
997
|
-
|
|
998
|
-
|
|
1000
|
+
Adds a JSON document to the specified data stream or index and makes it searchable.
|
|
1001
|
+
If the target is an index and the document already exists, the request updates
|
|
1002
|
+
the document and increments its version.
|
|
999
1003
|
|
|
1000
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1004
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-index_.html>`_
|
|
1001
1005
|
|
|
1002
1006
|
:param index: Name of the data stream or index to target. If the target doesn’t
|
|
1003
1007
|
exist and matches the name or wildcard (`*`) pattern of an index template
|
|
@@ -1086,22 +1090,22 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1086
1090
|
if_seq_no: t.Optional[int] = None,
|
|
1087
1091
|
pretty: t.Optional[bool] = None,
|
|
1088
1092
|
refresh: t.Optional[
|
|
1089
|
-
t.Union[
|
|
1093
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
1090
1094
|
] = None,
|
|
1091
1095
|
routing: t.Optional[str] = None,
|
|
1092
|
-
timeout: t.Optional[t.Union[
|
|
1096
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1093
1097
|
version: t.Optional[int] = None,
|
|
1094
1098
|
version_type: t.Optional[
|
|
1095
|
-
t.Union[
|
|
1099
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1096
1100
|
] = None,
|
|
1097
1101
|
wait_for_active_shards: t.Optional[
|
|
1098
|
-
t.Union[int, t.Union[
|
|
1102
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
1099
1103
|
] = None,
|
|
1100
1104
|
) -> ObjectApiResponse[t.Any]:
|
|
1101
1105
|
"""
|
|
1102
|
-
Removes a document from the index.
|
|
1106
|
+
Removes a JSON document from the specified index.
|
|
1103
1107
|
|
|
1104
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1108
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-delete.html>`_
|
|
1105
1109
|
|
|
1106
1110
|
:param index: Name of the target index.
|
|
1107
1111
|
:param id: Unique identifier for the document.
|
|
@@ -1175,16 +1179,16 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1175
1179
|
allow_no_indices: t.Optional[bool] = None,
|
|
1176
1180
|
analyze_wildcard: t.Optional[bool] = None,
|
|
1177
1181
|
analyzer: t.Optional[str] = None,
|
|
1178
|
-
conflicts: t.Optional[t.Union[
|
|
1179
|
-
default_operator: t.Optional[t.Union[
|
|
1182
|
+
conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None,
|
|
1183
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
1180
1184
|
df: t.Optional[str] = None,
|
|
1181
1185
|
error_trace: t.Optional[bool] = None,
|
|
1182
1186
|
expand_wildcards: t.Optional[
|
|
1183
1187
|
t.Union[
|
|
1184
1188
|
t.Sequence[
|
|
1185
|
-
t.Union[
|
|
1189
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
1186
1190
|
],
|
|
1187
|
-
t.Union[
|
|
1191
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
1188
1192
|
]
|
|
1189
1193
|
] = None,
|
|
1190
1194
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1201,31 +1205,29 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1201
1205
|
request_cache: t.Optional[bool] = None,
|
|
1202
1206
|
requests_per_second: t.Optional[float] = None,
|
|
1203
1207
|
routing: t.Optional[str] = None,
|
|
1204
|
-
scroll: t.Optional[t.Union[
|
|
1208
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1205
1209
|
scroll_size: t.Optional[int] = None,
|
|
1206
|
-
search_timeout: t.Optional[
|
|
1207
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
1208
|
-
] = None,
|
|
1210
|
+
search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1209
1211
|
search_type: t.Optional[
|
|
1210
|
-
t.Union[
|
|
1212
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
1211
1213
|
] = None,
|
|
1212
1214
|
slice: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
1213
|
-
slices: t.Optional[t.Union[int, t.Union[
|
|
1215
|
+
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
1214
1216
|
sort: t.Optional[t.Sequence[str]] = None,
|
|
1215
1217
|
stats: t.Optional[t.Sequence[str]] = None,
|
|
1216
1218
|
terminate_after: t.Optional[int] = None,
|
|
1217
|
-
timeout: t.Optional[t.Union[
|
|
1219
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1218
1220
|
version: t.Optional[bool] = None,
|
|
1219
1221
|
wait_for_active_shards: t.Optional[
|
|
1220
|
-
t.Union[int, t.Union[
|
|
1222
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
1221
1223
|
] = None,
|
|
1222
1224
|
wait_for_completion: t.Optional[bool] = None,
|
|
1223
1225
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1224
1226
|
) -> ObjectApiResponse[t.Any]:
|
|
1225
1227
|
"""
|
|
1226
|
-
Deletes documents
|
|
1228
|
+
Deletes documents that match the specified query.
|
|
1227
1229
|
|
|
1228
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1230
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-delete-by-query.html>`_
|
|
1229
1231
|
|
|
1230
1232
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
1231
1233
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -1403,7 +1405,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1403
1405
|
"""
|
|
1404
1406
|
Changes the number of requests per second for a particular Delete By Query operation.
|
|
1405
1407
|
|
|
1406
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1408
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-delete-by-query.html>`_
|
|
1407
1409
|
|
|
1408
1410
|
:param task_id: The ID for the task.
|
|
1409
1411
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -1442,16 +1444,14 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1442
1444
|
error_trace: t.Optional[bool] = None,
|
|
1443
1445
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1444
1446
|
human: t.Optional[bool] = None,
|
|
1445
|
-
master_timeout: t.Optional[
|
|
1446
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
1447
|
-
] = None,
|
|
1447
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1448
1448
|
pretty: t.Optional[bool] = None,
|
|
1449
|
-
timeout: t.Optional[t.Union[
|
|
1449
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1450
1450
|
) -> ObjectApiResponse[t.Any]:
|
|
1451
1451
|
"""
|
|
1452
|
-
Deletes a script.
|
|
1452
|
+
Deletes a stored script or search template.
|
|
1453
1453
|
|
|
1454
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1454
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
1455
1455
|
|
|
1456
1456
|
:param id: Identifier for the stored script or search template.
|
|
1457
1457
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -1513,13 +1513,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1513
1513
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1514
1514
|
version: t.Optional[int] = None,
|
|
1515
1515
|
version_type: t.Optional[
|
|
1516
|
-
t.Union[
|
|
1516
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1517
1517
|
] = None,
|
|
1518
1518
|
) -> HeadApiResponse:
|
|
1519
1519
|
"""
|
|
1520
|
-
|
|
1520
|
+
Checks if a document in an index exists.
|
|
1521
1521
|
|
|
1522
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1522
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
1523
1523
|
|
|
1524
1524
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1525
1525
|
wildcards (`*`).
|
|
@@ -1614,13 +1614,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1614
1614
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1615
1615
|
version: t.Optional[int] = None,
|
|
1616
1616
|
version_type: t.Optional[
|
|
1617
|
-
t.Union[
|
|
1617
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1618
1618
|
] = None,
|
|
1619
1619
|
) -> HeadApiResponse:
|
|
1620
1620
|
"""
|
|
1621
|
-
|
|
1621
|
+
Checks if a document's `_source` is stored.
|
|
1622
1622
|
|
|
1623
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1623
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
1624
1624
|
|
|
1625
1625
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1626
1626
|
wildcards (`*`).
|
|
@@ -1700,7 +1700,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1700
1700
|
id: str,
|
|
1701
1701
|
analyze_wildcard: t.Optional[bool] = None,
|
|
1702
1702
|
analyzer: t.Optional[str] = None,
|
|
1703
|
-
default_operator: t.Optional[t.Union[
|
|
1703
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
1704
1704
|
df: t.Optional[str] = None,
|
|
1705
1705
|
error_trace: t.Optional[bool] = None,
|
|
1706
1706
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1718,9 +1718,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1718
1718
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1719
1719
|
) -> ObjectApiResponse[t.Any]:
|
|
1720
1720
|
"""
|
|
1721
|
-
Returns information about why a specific matches (or doesn
|
|
1721
|
+
Returns information about why a specific document matches (or doesn’t match)
|
|
1722
|
+
a query.
|
|
1722
1723
|
|
|
1723
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1724
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-explain.html>`_
|
|
1724
1725
|
|
|
1725
1726
|
:param index: Index names used to limit the request. Only a single index name
|
|
1726
1727
|
can be provided to this parameter.
|
|
@@ -1818,9 +1819,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1818
1819
|
expand_wildcards: t.Optional[
|
|
1819
1820
|
t.Union[
|
|
1820
1821
|
t.Sequence[
|
|
1821
|
-
t.Union[
|
|
1822
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
1822
1823
|
],
|
|
1823
|
-
t.Union[
|
|
1824
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
1824
1825
|
]
|
|
1825
1826
|
] = None,
|
|
1826
1827
|
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1837,9 +1838,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1837
1838
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1838
1839
|
) -> ObjectApiResponse[t.Any]:
|
|
1839
1840
|
"""
|
|
1840
|
-
|
|
1841
|
+
The field capabilities API returns the information about the capabilities of
|
|
1842
|
+
fields among multiple indices. The field capabilities API returns runtime fields
|
|
1843
|
+
like any other field. For example, a runtime field with a type of keyword is
|
|
1844
|
+
returned as any other field that belongs to the `keyword` family.
|
|
1841
1845
|
|
|
1842
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1846
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-field-caps.html>`_
|
|
1843
1847
|
|
|
1844
1848
|
:param index: Comma-separated list of data streams, indices, and aliases used
|
|
1845
1849
|
to limit the request. Supports wildcards (*). To target all data streams
|
|
@@ -1949,13 +1953,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1949
1953
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1950
1954
|
version: t.Optional[int] = None,
|
|
1951
1955
|
version_type: t.Optional[
|
|
1952
|
-
t.Union[
|
|
1956
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1953
1957
|
] = None,
|
|
1954
1958
|
) -> ObjectApiResponse[t.Any]:
|
|
1955
1959
|
"""
|
|
1956
1960
|
Returns a document.
|
|
1957
1961
|
|
|
1958
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1962
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
1959
1963
|
|
|
1960
1964
|
:param index: Name of the index that contains the document.
|
|
1961
1965
|
:param id: Unique identifier of the document.
|
|
@@ -2038,15 +2042,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2038
2042
|
error_trace: t.Optional[bool] = None,
|
|
2039
2043
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2040
2044
|
human: t.Optional[bool] = None,
|
|
2041
|
-
master_timeout: t.Optional[
|
|
2042
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
2043
|
-
] = None,
|
|
2045
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2044
2046
|
pretty: t.Optional[bool] = None,
|
|
2045
2047
|
) -> ObjectApiResponse[t.Any]:
|
|
2046
2048
|
"""
|
|
2047
|
-
|
|
2049
|
+
Retrieves a stored script or search template.
|
|
2048
2050
|
|
|
2049
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2051
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
2050
2052
|
|
|
2051
2053
|
:param id: Identifier for the stored script or search template.
|
|
2052
2054
|
:param master_timeout: Specify timeout for connection to master
|
|
@@ -2088,7 +2090,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2088
2090
|
"""
|
|
2089
2091
|
Returns all script contexts.
|
|
2090
2092
|
|
|
2091
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
2093
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.15/painless-contexts.html>`_
|
|
2092
2094
|
"""
|
|
2093
2095
|
__path_parts: t.Dict[str, str] = {}
|
|
2094
2096
|
__path = "/_script_context"
|
|
@@ -2123,7 +2125,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2123
2125
|
"""
|
|
2124
2126
|
Returns available script types, languages and contexts
|
|
2125
2127
|
|
|
2126
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2128
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
2127
2129
|
"""
|
|
2128
2130
|
__path_parts: t.Dict[str, str] = {}
|
|
2129
2131
|
__path = "/_script_language"
|
|
@@ -2172,13 +2174,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2172
2174
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2173
2175
|
version: t.Optional[int] = None,
|
|
2174
2176
|
version_type: t.Optional[
|
|
2175
|
-
t.Union[
|
|
2177
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
2176
2178
|
] = None,
|
|
2177
2179
|
) -> ObjectApiResponse[t.Any]:
|
|
2178
2180
|
"""
|
|
2179
2181
|
Returns the source of a document.
|
|
2180
2182
|
|
|
2181
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2183
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
2182
2184
|
|
|
2183
2185
|
:param index: Name of the index that contains the document.
|
|
2184
2186
|
:param id: Unique identifier of the document.
|
|
@@ -2255,13 +2257,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2255
2257
|
human: t.Optional[bool] = None,
|
|
2256
2258
|
pretty: t.Optional[bool] = None,
|
|
2257
2259
|
size: t.Optional[int] = None,
|
|
2258
|
-
timeout: t.Optional[t.Union[
|
|
2260
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2259
2261
|
verbose: t.Optional[bool] = None,
|
|
2260
2262
|
) -> ObjectApiResponse[t.Any]:
|
|
2261
2263
|
"""
|
|
2262
2264
|
Returns the health of the cluster.
|
|
2263
2265
|
|
|
2264
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2266
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/health-api.html>`_
|
|
2265
2267
|
|
|
2266
2268
|
:param feature: A feature of the cluster, as returned by the top-level health
|
|
2267
2269
|
report API.
|
|
@@ -2316,27 +2318,29 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2316
2318
|
human: t.Optional[bool] = None,
|
|
2317
2319
|
if_primary_term: t.Optional[int] = None,
|
|
2318
2320
|
if_seq_no: t.Optional[int] = None,
|
|
2319
|
-
op_type: t.Optional[t.Union[
|
|
2321
|
+
op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None,
|
|
2320
2322
|
pipeline: t.Optional[str] = None,
|
|
2321
2323
|
pretty: t.Optional[bool] = None,
|
|
2322
2324
|
refresh: t.Optional[
|
|
2323
|
-
t.Union[
|
|
2325
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
2324
2326
|
] = None,
|
|
2325
2327
|
require_alias: t.Optional[bool] = None,
|
|
2326
2328
|
routing: t.Optional[str] = None,
|
|
2327
|
-
timeout: t.Optional[t.Union[
|
|
2329
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2328
2330
|
version: t.Optional[int] = None,
|
|
2329
2331
|
version_type: t.Optional[
|
|
2330
|
-
t.Union[
|
|
2332
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
2331
2333
|
] = None,
|
|
2332
2334
|
wait_for_active_shards: t.Optional[
|
|
2333
|
-
t.Union[int, t.Union[
|
|
2335
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
2334
2336
|
] = None,
|
|
2335
2337
|
) -> ObjectApiResponse[t.Any]:
|
|
2336
2338
|
"""
|
|
2337
|
-
|
|
2339
|
+
Adds a JSON document to the specified data stream or index and makes it searchable.
|
|
2340
|
+
If the target is an index and the document already exists, the request updates
|
|
2341
|
+
the document and increments its version.
|
|
2338
2342
|
|
|
2339
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2343
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-index_.html>`_
|
|
2340
2344
|
|
|
2341
2345
|
:param index: Name of the data stream or index to target.
|
|
2342
2346
|
:param document:
|
|
@@ -2445,7 +2449,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2445
2449
|
"""
|
|
2446
2450
|
Returns basic information about the cluster.
|
|
2447
2451
|
|
|
2448
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2452
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index.html>`_
|
|
2449
2453
|
"""
|
|
2450
2454
|
__path_parts: t.Dict[str, str] = {}
|
|
2451
2455
|
__path = "/"
|
|
@@ -2501,7 +2505,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2501
2505
|
"""
|
|
2502
2506
|
Performs a kNN search.
|
|
2503
2507
|
|
|
2504
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2508
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-search.html>`_
|
|
2505
2509
|
|
|
2506
2510
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
2507
2511
|
to perform the operation on all indices
|
|
@@ -2602,7 +2606,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2602
2606
|
"""
|
|
2603
2607
|
Allows to get multiple documents in one request.
|
|
2604
2608
|
|
|
2605
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2609
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-multi-get.html>`_
|
|
2606
2610
|
|
|
2607
2611
|
:param index: Name of the index to retrieve documents from when `ids` are specified,
|
|
2608
2612
|
or when a document in the `docs` array does not specify an index.
|
|
@@ -2699,15 +2703,16 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2699
2703
|
expand_wildcards: t.Optional[
|
|
2700
2704
|
t.Union[
|
|
2701
2705
|
t.Sequence[
|
|
2702
|
-
t.Union[
|
|
2706
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
2703
2707
|
],
|
|
2704
|
-
t.Union[
|
|
2708
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
2705
2709
|
]
|
|
2706
2710
|
] = None,
|
|
2707
2711
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2708
2712
|
human: t.Optional[bool] = None,
|
|
2709
2713
|
ignore_throttled: t.Optional[bool] = None,
|
|
2710
2714
|
ignore_unavailable: t.Optional[bool] = None,
|
|
2715
|
+
include_named_queries_score: t.Optional[bool] = None,
|
|
2711
2716
|
max_concurrent_searches: t.Optional[int] = None,
|
|
2712
2717
|
max_concurrent_shard_requests: t.Optional[int] = None,
|
|
2713
2718
|
pre_filter_shard_size: t.Optional[int] = None,
|
|
@@ -2715,14 +2720,14 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2715
2720
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
2716
2721
|
routing: t.Optional[str] = None,
|
|
2717
2722
|
search_type: t.Optional[
|
|
2718
|
-
t.Union[
|
|
2723
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
2719
2724
|
] = None,
|
|
2720
2725
|
typed_keys: t.Optional[bool] = None,
|
|
2721
2726
|
) -> ObjectApiResponse[t.Any]:
|
|
2722
2727
|
"""
|
|
2723
2728
|
Allows to execute several search operations in one request.
|
|
2724
2729
|
|
|
2725
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2730
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-multi-search.html>`_
|
|
2726
2731
|
|
|
2727
2732
|
:param searches:
|
|
2728
2733
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
@@ -2741,6 +2746,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2741
2746
|
when frozen.
|
|
2742
2747
|
:param ignore_unavailable: If true, missing or closed indices are not included
|
|
2743
2748
|
in the response.
|
|
2749
|
+
:param include_named_queries_score: Indicates whether hit.matched_queries should
|
|
2750
|
+
be rendered as a map that includes the name of the matched query associated
|
|
2751
|
+
with its score (true) or as an array containing the name of the matched queries
|
|
2752
|
+
(false) This functionality reruns each named query on every hit in a search
|
|
2753
|
+
response. Typically, this adds a small overhead to a request. However, using
|
|
2754
|
+
computationally expensive named queries on a large number of hits may add
|
|
2755
|
+
significant overhead.
|
|
2744
2756
|
:param max_concurrent_searches: Maximum number of concurrent searches the multi
|
|
2745
2757
|
search API can execute.
|
|
2746
2758
|
:param max_concurrent_shard_requests: Maximum number of concurrent shard requests
|
|
@@ -2790,6 +2802,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2790
2802
|
__query["ignore_throttled"] = ignore_throttled
|
|
2791
2803
|
if ignore_unavailable is not None:
|
|
2792
2804
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
2805
|
+
if include_named_queries_score is not None:
|
|
2806
|
+
__query["include_named_queries_score"] = include_named_queries_score
|
|
2793
2807
|
if max_concurrent_searches is not None:
|
|
2794
2808
|
__query["max_concurrent_searches"] = max_concurrent_searches
|
|
2795
2809
|
if max_concurrent_shard_requests is not None:
|
|
@@ -2838,14 +2852,14 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2838
2852
|
pretty: t.Optional[bool] = None,
|
|
2839
2853
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
2840
2854
|
search_type: t.Optional[
|
|
2841
|
-
t.Union[
|
|
2855
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
2842
2856
|
] = None,
|
|
2843
2857
|
typed_keys: t.Optional[bool] = None,
|
|
2844
2858
|
) -> ObjectApiResponse[t.Any]:
|
|
2845
2859
|
"""
|
|
2846
|
-
|
|
2860
|
+
Runs multiple templated searches with a single request.
|
|
2847
2861
|
|
|
2848
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2862
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-multi-search.html>`_
|
|
2849
2863
|
|
|
2850
2864
|
:param search_templates:
|
|
2851
2865
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
@@ -2933,14 +2947,14 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2933
2947
|
term_statistics: t.Optional[bool] = None,
|
|
2934
2948
|
version: t.Optional[int] = None,
|
|
2935
2949
|
version_type: t.Optional[
|
|
2936
|
-
t.Union[
|
|
2950
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
2937
2951
|
] = None,
|
|
2938
2952
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2939
2953
|
) -> ObjectApiResponse[t.Any]:
|
|
2940
2954
|
"""
|
|
2941
2955
|
Returns multiple termvectors in one request.
|
|
2942
2956
|
|
|
2943
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2957
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-multi-termvectors.html>`_
|
|
2944
2958
|
|
|
2945
2959
|
:param index: Name of the index that contains the documents.
|
|
2946
2960
|
:param docs: Array of existing or artificial documents.
|
|
@@ -3027,14 +3041,14 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3027
3041
|
self,
|
|
3028
3042
|
*,
|
|
3029
3043
|
index: t.Union[str, t.Sequence[str]],
|
|
3030
|
-
keep_alive: t.Union[
|
|
3044
|
+
keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]],
|
|
3031
3045
|
error_trace: t.Optional[bool] = None,
|
|
3032
3046
|
expand_wildcards: t.Optional[
|
|
3033
3047
|
t.Union[
|
|
3034
3048
|
t.Sequence[
|
|
3035
|
-
t.Union[
|
|
3049
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3036
3050
|
],
|
|
3037
|
-
t.Union[
|
|
3051
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3038
3052
|
]
|
|
3039
3053
|
] = None,
|
|
3040
3054
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -3045,9 +3059,15 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3045
3059
|
routing: t.Optional[str] = None,
|
|
3046
3060
|
) -> ObjectApiResponse[t.Any]:
|
|
3047
3061
|
"""
|
|
3048
|
-
|
|
3062
|
+
A search request by default executes against the most recent visible data of
|
|
3063
|
+
the target indices, which is called point in time. Elasticsearch pit (point in
|
|
3064
|
+
time) is a lightweight view into the state of the data as it existed when initiated.
|
|
3065
|
+
In some cases, it’s preferred to perform multiple search requests using the same
|
|
3066
|
+
point in time. For example, if refreshes happen between `search_after` requests,
|
|
3067
|
+
then the results of those requests might not be consistent as changes happening
|
|
3068
|
+
between searches are only visible to the more recent point in time.
|
|
3049
3069
|
|
|
3050
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3070
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/point-in-time-api.html>`_
|
|
3051
3071
|
|
|
3052
3072
|
:param index: A comma-separated list of index names to open point in time; use
|
|
3053
3073
|
`_all` or empty string to perform the operation on all indices
|
|
@@ -3109,17 +3129,15 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3109
3129
|
error_trace: t.Optional[bool] = None,
|
|
3110
3130
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3111
3131
|
human: t.Optional[bool] = None,
|
|
3112
|
-
master_timeout: t.Optional[
|
|
3113
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
3114
|
-
] = None,
|
|
3132
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3115
3133
|
pretty: t.Optional[bool] = None,
|
|
3116
|
-
timeout: t.Optional[t.Union[
|
|
3134
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3117
3135
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3118
3136
|
) -> ObjectApiResponse[t.Any]:
|
|
3119
3137
|
"""
|
|
3120
|
-
Creates or updates a script.
|
|
3138
|
+
Creates or updates a stored script or search template.
|
|
3121
3139
|
|
|
3122
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3140
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
3123
3141
|
|
|
3124
3142
|
:param id: Identifier for the stored script or search template. Must be unique
|
|
3125
3143
|
within the cluster.
|
|
@@ -3188,9 +3206,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3188
3206
|
expand_wildcards: t.Optional[
|
|
3189
3207
|
t.Union[
|
|
3190
3208
|
t.Sequence[
|
|
3191
|
-
t.Union[
|
|
3209
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3192
3210
|
],
|
|
3193
|
-
t.Union[
|
|
3211
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3194
3212
|
]
|
|
3195
3213
|
] = None,
|
|
3196
3214
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -3202,10 +3220,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3202
3220
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3203
3221
|
) -> ObjectApiResponse[t.Any]:
|
|
3204
3222
|
"""
|
|
3205
|
-
|
|
3206
|
-
search queries
|
|
3223
|
+
Enables you to evaluate the quality of ranked search results over a set of typical
|
|
3224
|
+
search queries.
|
|
3207
3225
|
|
|
3208
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3226
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-rank-eval.html>`_
|
|
3209
3227
|
|
|
3210
3228
|
:param requests: A set of typical search requests, together with their provided
|
|
3211
3229
|
ratings.
|
|
@@ -3276,7 +3294,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3276
3294
|
*,
|
|
3277
3295
|
dest: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3278
3296
|
source: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3279
|
-
conflicts: t.Optional[t.Union[
|
|
3297
|
+
conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None,
|
|
3280
3298
|
error_trace: t.Optional[bool] = None,
|
|
3281
3299
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3282
3300
|
human: t.Optional[bool] = None,
|
|
@@ -3286,12 +3304,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3286
3304
|
requests_per_second: t.Optional[float] = None,
|
|
3287
3305
|
require_alias: t.Optional[bool] = None,
|
|
3288
3306
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3289
|
-
scroll: t.Optional[t.Union[
|
|
3307
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3290
3308
|
size: t.Optional[int] = None,
|
|
3291
|
-
slices: t.Optional[t.Union[int, t.Union[
|
|
3292
|
-
timeout: t.Optional[t.Union[
|
|
3309
|
+
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
3310
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3293
3311
|
wait_for_active_shards: t.Optional[
|
|
3294
|
-
t.Union[int, t.Union[
|
|
3312
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
3295
3313
|
] = None,
|
|
3296
3314
|
wait_for_completion: t.Optional[bool] = None,
|
|
3297
3315
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
@@ -3301,7 +3319,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3301
3319
|
source documents by a query, changing the destination index settings, or fetching
|
|
3302
3320
|
the documents from a remote cluster.
|
|
3303
3321
|
|
|
3304
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3322
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-reindex.html>`_
|
|
3305
3323
|
|
|
3306
3324
|
:param dest: The destination you are copying to.
|
|
3307
3325
|
:param source: The source you are copying from.
|
|
@@ -3395,9 +3413,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3395
3413
|
requests_per_second: t.Optional[float] = None,
|
|
3396
3414
|
) -> ObjectApiResponse[t.Any]:
|
|
3397
3415
|
"""
|
|
3398
|
-
|
|
3416
|
+
Copies documents from a source to a destination.
|
|
3399
3417
|
|
|
3400
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3418
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-reindex.html>`_
|
|
3401
3419
|
|
|
3402
3420
|
:param task_id: Identifier for the task.
|
|
3403
3421
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -3446,9 +3464,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3446
3464
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3447
3465
|
) -> ObjectApiResponse[t.Any]:
|
|
3448
3466
|
"""
|
|
3449
|
-
|
|
3467
|
+
Renders a search template as a search request body.
|
|
3450
3468
|
|
|
3451
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3469
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/render-search-template-api.html>`_
|
|
3452
3470
|
|
|
3453
3471
|
:param id: ID of the search template to render. If no `source` is specified,
|
|
3454
3472
|
this or the `id` request body parameter is required.
|
|
@@ -3514,9 +3532,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3514
3532
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3515
3533
|
) -> ObjectApiResponse[t.Any]:
|
|
3516
3534
|
"""
|
|
3517
|
-
|
|
3535
|
+
Runs a script and returns a result.
|
|
3518
3536
|
|
|
3519
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
3537
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.15/painless-execute-api.html>`_
|
|
3520
3538
|
|
|
3521
3539
|
:param context: The context that the script should run in.
|
|
3522
3540
|
:param context_setup: Additional parameters for the `context`.
|
|
@@ -3568,13 +3586,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3568
3586
|
human: t.Optional[bool] = None,
|
|
3569
3587
|
pretty: t.Optional[bool] = None,
|
|
3570
3588
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
3571
|
-
scroll: t.Optional[t.Union[
|
|
3589
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3572
3590
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3573
3591
|
) -> ObjectApiResponse[t.Any]:
|
|
3574
3592
|
"""
|
|
3575
3593
|
Allows to retrieve a large numbers of results from a single search request.
|
|
3576
3594
|
|
|
3577
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3595
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-request-body.html#request-body-search-scroll>`_
|
|
3578
3596
|
|
|
3579
3597
|
:param scroll_id: Scroll ID of the search.
|
|
3580
3598
|
:param rest_total_hits_as_int: If true, the API response’s hit.total property
|
|
@@ -3638,6 +3656,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3638
3656
|
"query",
|
|
3639
3657
|
"rank",
|
|
3640
3658
|
"rescore",
|
|
3659
|
+
"retriever",
|
|
3641
3660
|
"runtime_mappings",
|
|
3642
3661
|
"script_fields",
|
|
3643
3662
|
"search_after",
|
|
@@ -3675,16 +3694,16 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3675
3694
|
batched_reduce_size: t.Optional[int] = None,
|
|
3676
3695
|
ccs_minimize_roundtrips: t.Optional[bool] = None,
|
|
3677
3696
|
collapse: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3678
|
-
default_operator: t.Optional[t.Union[
|
|
3697
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
3679
3698
|
df: t.Optional[str] = None,
|
|
3680
3699
|
docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
|
|
3681
3700
|
error_trace: t.Optional[bool] = None,
|
|
3682
3701
|
expand_wildcards: t.Optional[
|
|
3683
3702
|
t.Union[
|
|
3684
3703
|
t.Sequence[
|
|
3685
|
-
t.Union[
|
|
3704
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3686
3705
|
],
|
|
3687
|
-
t.Union[
|
|
3706
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3688
3707
|
]
|
|
3689
3708
|
] = None,
|
|
3690
3709
|
explain: t.Optional[bool] = None,
|
|
@@ -3697,6 +3716,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3697
3716
|
human: t.Optional[bool] = None,
|
|
3698
3717
|
ignore_throttled: t.Optional[bool] = None,
|
|
3699
3718
|
ignore_unavailable: t.Optional[bool] = None,
|
|
3719
|
+
include_named_queries_score: t.Optional[bool] = None,
|
|
3700
3720
|
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
|
|
3701
3721
|
knn: t.Optional[
|
|
3702
3722
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
@@ -3719,15 +3739,16 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3719
3739
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
3720
3740
|
] = None,
|
|
3721
3741
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
3742
|
+
retriever: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3722
3743
|
routing: t.Optional[str] = None,
|
|
3723
3744
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
3724
3745
|
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
3725
|
-
scroll: t.Optional[t.Union[
|
|
3746
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3726
3747
|
search_after: t.Optional[
|
|
3727
3748
|
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
|
|
3728
3749
|
] = None,
|
|
3729
3750
|
search_type: t.Optional[
|
|
3730
|
-
t.Union[
|
|
3751
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
3731
3752
|
] = None,
|
|
3732
3753
|
seq_no_primary_term: t.Optional[bool] = None,
|
|
3733
3754
|
size: t.Optional[int] = None,
|
|
@@ -3746,7 +3767,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3746
3767
|
suggest: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3747
3768
|
suggest_field: t.Optional[str] = None,
|
|
3748
3769
|
suggest_mode: t.Optional[
|
|
3749
|
-
t.Union[
|
|
3770
|
+
t.Union[str, t.Literal["always", "missing", "popular"]]
|
|
3750
3771
|
] = None,
|
|
3751
3772
|
suggest_size: t.Optional[int] = None,
|
|
3752
3773
|
suggest_text: t.Optional[str] = None,
|
|
@@ -3759,9 +3780,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3759
3780
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3760
3781
|
) -> ObjectApiResponse[t.Any]:
|
|
3761
3782
|
"""
|
|
3762
|
-
Returns
|
|
3783
|
+
Returns search hits that match the query defined in the request. You can provide
|
|
3784
|
+
search queries using the `q` query string parameter or the request body. If both
|
|
3785
|
+
are specified, only the query parameter is used.
|
|
3763
3786
|
|
|
3764
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3787
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-search.html>`_
|
|
3765
3788
|
|
|
3766
3789
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
3767
3790
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -3821,6 +3844,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3821
3844
|
be ignored when frozen.
|
|
3822
3845
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
3823
3846
|
a missing or closed index.
|
|
3847
|
+
:param include_named_queries_score: Indicates whether hit.matched_queries should
|
|
3848
|
+
be rendered as a map that includes the name of the matched query associated
|
|
3849
|
+
with its score (true) or as an array containing the name of the matched queries
|
|
3850
|
+
(false) This functionality reruns each named query on every hit in a search
|
|
3851
|
+
response. Typically, this adds a small overhead to a request. However, using
|
|
3852
|
+
computationally expensive named queries on a large number of hits may add
|
|
3853
|
+
significant overhead.
|
|
3824
3854
|
:param indices_boost: Boosts the _score of documents from specified indices.
|
|
3825
3855
|
:param knn: Defines the approximate kNN search to run.
|
|
3826
3856
|
:param lenient: If `true`, format-based query failures (such as providing text
|
|
@@ -3878,6 +3908,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3878
3908
|
example 100 - 500) documents returned by the `query` and `post_filter` phases.
|
|
3879
3909
|
:param rest_total_hits_as_int: Indicates whether `hits.total` should be rendered
|
|
3880
3910
|
as an integer or an object in the rest search response.
|
|
3911
|
+
:param retriever: A retriever is a specification to describe top documents returned
|
|
3912
|
+
from a search. A retriever replaces other elements of the search API that
|
|
3913
|
+
also return top documents such as query and knn.
|
|
3881
3914
|
:param routing: Custom value used to route operations to a specific shard.
|
|
3882
3915
|
:param runtime_mappings: Defines one or more runtime fields in the search request.
|
|
3883
3916
|
These fields take precedence over mapped fields with the same name.
|
|
@@ -3999,6 +4032,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3999
4032
|
__query["ignore_throttled"] = ignore_throttled
|
|
4000
4033
|
if ignore_unavailable is not None:
|
|
4001
4034
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
4035
|
+
if include_named_queries_score is not None:
|
|
4036
|
+
__query["include_named_queries_score"] = include_named_queries_score
|
|
4002
4037
|
if lenient is not None:
|
|
4003
4038
|
__query["lenient"] = lenient
|
|
4004
4039
|
if max_concurrent_shard_requests is not None:
|
|
@@ -4074,6 +4109,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4074
4109
|
__body["rank"] = rank
|
|
4075
4110
|
if rescore is not None:
|
|
4076
4111
|
__body["rescore"] = rescore
|
|
4112
|
+
if retriever is not None:
|
|
4113
|
+
__body["retriever"] = retriever
|
|
4077
4114
|
if runtime_mappings is not None:
|
|
4078
4115
|
__body["runtime_mappings"] = runtime_mappings
|
|
4079
4116
|
if script_fields is not None:
|
|
@@ -4154,10 +4191,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4154
4191
|
extent: t.Optional[int] = None,
|
|
4155
4192
|
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4156
4193
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4157
|
-
grid_agg: t.Optional[t.Union[
|
|
4194
|
+
grid_agg: t.Optional[t.Union[str, t.Literal["geohex", "geotile"]]] = None,
|
|
4158
4195
|
grid_precision: t.Optional[int] = None,
|
|
4159
4196
|
grid_type: t.Optional[
|
|
4160
|
-
t.Union[
|
|
4197
|
+
t.Union[str, t.Literal["centroid", "grid", "point"]]
|
|
4161
4198
|
] = None,
|
|
4162
4199
|
human: t.Optional[bool] = None,
|
|
4163
4200
|
pretty: t.Optional[bool] = None,
|
|
@@ -4178,7 +4215,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4178
4215
|
Searches a vector tile for geospatial values. Returns results as a binary Mapbox
|
|
4179
4216
|
vector tile.
|
|
4180
4217
|
|
|
4181
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4218
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-vector-tile-api.html>`_
|
|
4182
4219
|
|
|
4183
4220
|
:param index: Comma-separated list of data streams, indices, or aliases to search
|
|
4184
4221
|
:param field: Field containing geospatial data to return
|
|
@@ -4316,9 +4353,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4316
4353
|
expand_wildcards: t.Optional[
|
|
4317
4354
|
t.Union[
|
|
4318
4355
|
t.Sequence[
|
|
4319
|
-
t.Union[
|
|
4356
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
4320
4357
|
],
|
|
4321
|
-
t.Union[
|
|
4358
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
4322
4359
|
]
|
|
4323
4360
|
] = None,
|
|
4324
4361
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -4333,7 +4370,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4333
4370
|
Returns information about the indices and shards that a search request would
|
|
4334
4371
|
be executed against.
|
|
4335
4372
|
|
|
4336
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4373
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-shards.html>`_
|
|
4337
4374
|
|
|
4338
4375
|
:param index: Returns the indices and shards that a search request would be executed
|
|
4339
4376
|
against.
|
|
@@ -4406,9 +4443,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4406
4443
|
expand_wildcards: t.Optional[
|
|
4407
4444
|
t.Union[
|
|
4408
4445
|
t.Sequence[
|
|
4409
|
-
t.Union[
|
|
4446
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
4410
4447
|
],
|
|
4411
|
-
t.Union[
|
|
4448
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
4412
4449
|
]
|
|
4413
4450
|
] = None,
|
|
4414
4451
|
explain: t.Optional[bool] = None,
|
|
@@ -4423,18 +4460,18 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4423
4460
|
profile: t.Optional[bool] = None,
|
|
4424
4461
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
4425
4462
|
routing: t.Optional[str] = None,
|
|
4426
|
-
scroll: t.Optional[t.Union[
|
|
4463
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4427
4464
|
search_type: t.Optional[
|
|
4428
|
-
t.Union[
|
|
4465
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
4429
4466
|
] = None,
|
|
4430
4467
|
source: t.Optional[str] = None,
|
|
4431
4468
|
typed_keys: t.Optional[bool] = None,
|
|
4432
4469
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4433
4470
|
) -> ObjectApiResponse[t.Any]:
|
|
4434
4471
|
"""
|
|
4435
|
-
|
|
4472
|
+
Runs a search with a search template.
|
|
4436
4473
|
|
|
4437
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4474
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-template.html>`_
|
|
4438
4475
|
|
|
4439
4476
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
4440
4477
|
Supports wildcards (*).
|
|
@@ -4560,7 +4597,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4560
4597
|
search_after: t.Optional[str] = None,
|
|
4561
4598
|
size: t.Optional[int] = None,
|
|
4562
4599
|
string: t.Optional[str] = None,
|
|
4563
|
-
timeout: t.Optional[t.Union[
|
|
4600
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4564
4601
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4565
4602
|
) -> ObjectApiResponse[t.Any]:
|
|
4566
4603
|
"""
|
|
@@ -4568,7 +4605,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4568
4605
|
the provided string. It is designed for low-latency look-ups used in auto-complete
|
|
4569
4606
|
scenarios.
|
|
4570
4607
|
|
|
4571
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4608
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-terms-enum.html>`_
|
|
4572
4609
|
|
|
4573
4610
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
4574
4611
|
to search. Wildcard (*) expressions are supported.
|
|
@@ -4659,7 +4696,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4659
4696
|
term_statistics: t.Optional[bool] = None,
|
|
4660
4697
|
version: t.Optional[int] = None,
|
|
4661
4698
|
version_type: t.Optional[
|
|
4662
|
-
t.Union[
|
|
4699
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
4663
4700
|
] = None,
|
|
4664
4701
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4665
4702
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -4667,7 +4704,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4667
4704
|
Returns information and statistics about terms in the fields of a particular
|
|
4668
4705
|
document.
|
|
4669
4706
|
|
|
4670
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4707
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-termvectors.html>`_
|
|
4671
4708
|
|
|
4672
4709
|
:param index: Name of the index that contains the document.
|
|
4673
4710
|
:param id: Unique identifier of the document.
|
|
@@ -4789,7 +4826,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4789
4826
|
lang: t.Optional[str] = None,
|
|
4790
4827
|
pretty: t.Optional[bool] = None,
|
|
4791
4828
|
refresh: t.Optional[
|
|
4792
|
-
t.Union[
|
|
4829
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
4793
4830
|
] = None,
|
|
4794
4831
|
require_alias: t.Optional[bool] = None,
|
|
4795
4832
|
retry_on_conflict: t.Optional[int] = None,
|
|
@@ -4799,17 +4836,17 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4799
4836
|
source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
|
|
4800
4837
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4801
4838
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4802
|
-
timeout: t.Optional[t.Union[
|
|
4839
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4803
4840
|
upsert: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4804
4841
|
wait_for_active_shards: t.Optional[
|
|
4805
|
-
t.Union[int, t.Union[
|
|
4842
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
4806
4843
|
] = None,
|
|
4807
4844
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4808
4845
|
) -> ObjectApiResponse[t.Any]:
|
|
4809
4846
|
"""
|
|
4810
4847
|
Updates a document with a script or partial document.
|
|
4811
4848
|
|
|
4812
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4849
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update.html>`_
|
|
4813
4850
|
|
|
4814
4851
|
:param index: The name of the index
|
|
4815
4852
|
:param id: Document ID
|
|
@@ -4922,16 +4959,16 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4922
4959
|
allow_no_indices: t.Optional[bool] = None,
|
|
4923
4960
|
analyze_wildcard: t.Optional[bool] = None,
|
|
4924
4961
|
analyzer: t.Optional[str] = None,
|
|
4925
|
-
conflicts: t.Optional[t.Union[
|
|
4926
|
-
default_operator: t.Optional[t.Union[
|
|
4962
|
+
conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None,
|
|
4963
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
4927
4964
|
df: t.Optional[str] = None,
|
|
4928
4965
|
error_trace: t.Optional[bool] = None,
|
|
4929
4966
|
expand_wildcards: t.Optional[
|
|
4930
4967
|
t.Union[
|
|
4931
4968
|
t.Sequence[
|
|
4932
|
-
t.Union[
|
|
4969
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
4933
4970
|
],
|
|
4934
|
-
t.Union[
|
|
4971
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
4935
4972
|
]
|
|
4936
4973
|
] = None,
|
|
4937
4974
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -4949,34 +4986,32 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4949
4986
|
requests_per_second: t.Optional[float] = None,
|
|
4950
4987
|
routing: t.Optional[str] = None,
|
|
4951
4988
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4952
|
-
scroll: t.Optional[t.Union[
|
|
4989
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4953
4990
|
scroll_size: t.Optional[int] = None,
|
|
4954
|
-
search_timeout: t.Optional[
|
|
4955
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
4956
|
-
] = None,
|
|
4991
|
+
search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4957
4992
|
search_type: t.Optional[
|
|
4958
|
-
t.Union[
|
|
4993
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
4959
4994
|
] = None,
|
|
4960
4995
|
slice: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4961
|
-
slices: t.Optional[t.Union[int, t.Union[
|
|
4996
|
+
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
4962
4997
|
sort: t.Optional[t.Sequence[str]] = None,
|
|
4963
4998
|
stats: t.Optional[t.Sequence[str]] = None,
|
|
4964
4999
|
terminate_after: t.Optional[int] = None,
|
|
4965
|
-
timeout: t.Optional[t.Union[
|
|
5000
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4966
5001
|
version: t.Optional[bool] = None,
|
|
4967
5002
|
version_type: t.Optional[bool] = None,
|
|
4968
5003
|
wait_for_active_shards: t.Optional[
|
|
4969
|
-
t.Union[int, t.Union[
|
|
5004
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
4970
5005
|
] = None,
|
|
4971
5006
|
wait_for_completion: t.Optional[bool] = None,
|
|
4972
5007
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4973
5008
|
) -> ObjectApiResponse[t.Any]:
|
|
4974
5009
|
"""
|
|
4975
5010
|
Updates documents that match the specified query. If no query is specified, performs
|
|
4976
|
-
an update on every document in the index without
|
|
4977
|
-
|
|
5011
|
+
an update on every document in the data stream or index without modifying the
|
|
5012
|
+
source, which is useful for picking up mapping changes.
|
|
4978
5013
|
|
|
4979
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5014
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update-by-query.html>`_
|
|
4980
5015
|
|
|
4981
5016
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
4982
5017
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -5169,7 +5204,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5169
5204
|
"""
|
|
5170
5205
|
Changes the number of requests per second for a particular Update By Query operation.
|
|
5171
5206
|
|
|
5172
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5207
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update-by-query.html>`_
|
|
5173
5208
|
|
|
5174
5209
|
:param task_id: The ID for the task.
|
|
5175
5210
|
:param requests_per_second: The throttle for this request in sub-requests per
|