elasticsearch 8.14.0__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 +196 -168
- 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 +87 -79
- 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 +282 -317
- elasticsearch/_async/client/inference.py +42 -33
- 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 +10 -10
- elasticsearch/_async/client/searchable_snapshots.py +9 -13
- elasticsearch/_async/client/security.py +577 -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 +196 -168
- 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 +87 -79
- 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 +282 -317
- elasticsearch/_sync/client/inference.py +42 -33
- 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 +10 -10
- elasticsearch/_sync/client/searchable_snapshots.py +9 -13
- elasticsearch/_sync/client/security.py +577 -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 -0
- elasticsearch-8.15.0.dist-info/METADATA +177 -0
- elasticsearch-8.15.0.dist-info/RECORD +117 -0
- {elasticsearch-8.14.0.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.14.0.dist-info/METADATA +0 -161
- elasticsearch-8.14.0.dist-info/RECORD +0 -116
- elasticsearch-8.14.0.dist-info/top_level.txt +0 -1
- {elasticsearch-8.14.0.dist-info → elasticsearch-8.15.0.dist-info/licenses}/LICENSE +0 -0
- {elasticsearch-8.14.0.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
|
|
@@ -433,6 +434,7 @@ class Elasticsearch(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 Elasticsearch(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)
|
|
@@ -623,22 +625,23 @@ class Elasticsearch(BaseClient):
|
|
|
623
625
|
pipeline: t.Optional[str] = None,
|
|
624
626
|
pretty: t.Optional[bool] = None,
|
|
625
627
|
refresh: t.Optional[
|
|
626
|
-
t.Union[
|
|
628
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
627
629
|
] = None,
|
|
628
630
|
require_alias: t.Optional[bool] = None,
|
|
629
631
|
routing: t.Optional[str] = None,
|
|
630
632
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
631
633
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
632
634
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
633
|
-
timeout: t.Optional[t.Union[
|
|
635
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
634
636
|
wait_for_active_shards: t.Optional[
|
|
635
|
-
t.Union[int, t.Union[
|
|
637
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
636
638
|
] = None,
|
|
637
639
|
) -> ObjectApiResponse[t.Any]:
|
|
638
640
|
"""
|
|
639
|
-
|
|
641
|
+
Performs multiple indexing or delete operations in a single API call. This reduces
|
|
642
|
+
overhead and can greatly increase indexing speed.
|
|
640
643
|
|
|
641
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
644
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-bulk.html>`_
|
|
642
645
|
|
|
643
646
|
:param operations:
|
|
644
647
|
:param index: Name of the data stream, index, or index alias to perform bulk
|
|
@@ -735,9 +738,9 @@ class Elasticsearch(BaseClient):
|
|
|
735
738
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
736
739
|
) -> ObjectApiResponse[t.Any]:
|
|
737
740
|
"""
|
|
738
|
-
|
|
741
|
+
Clears the search context and results for a scrolling search.
|
|
739
742
|
|
|
740
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
743
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/clear-scroll-api.html>`_
|
|
741
744
|
|
|
742
745
|
:param scroll_id: Scroll IDs to clear. To clear all scroll IDs, use `_all`.
|
|
743
746
|
"""
|
|
@@ -785,9 +788,9 @@ class Elasticsearch(BaseClient):
|
|
|
785
788
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
786
789
|
) -> ObjectApiResponse[t.Any]:
|
|
787
790
|
"""
|
|
788
|
-
|
|
791
|
+
Closes a point-in-time.
|
|
789
792
|
|
|
790
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
793
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/point-in-time-api.html>`_
|
|
791
794
|
|
|
792
795
|
:param id: The ID of the point-in-time.
|
|
793
796
|
"""
|
|
@@ -833,15 +836,15 @@ class Elasticsearch(BaseClient):
|
|
|
833
836
|
allow_no_indices: t.Optional[bool] = None,
|
|
834
837
|
analyze_wildcard: t.Optional[bool] = None,
|
|
835
838
|
analyzer: t.Optional[str] = None,
|
|
836
|
-
default_operator: t.Optional[t.Union[
|
|
839
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
837
840
|
df: t.Optional[str] = None,
|
|
838
841
|
error_trace: t.Optional[bool] = None,
|
|
839
842
|
expand_wildcards: t.Optional[
|
|
840
843
|
t.Union[
|
|
841
844
|
t.Sequence[
|
|
842
|
-
t.Union[
|
|
845
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
843
846
|
],
|
|
844
|
-
t.Union[
|
|
847
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
845
848
|
]
|
|
846
849
|
] = None,
|
|
847
850
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -861,7 +864,7 @@ class Elasticsearch(BaseClient):
|
|
|
861
864
|
"""
|
|
862
865
|
Returns number of documents matching a query.
|
|
863
866
|
|
|
864
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
867
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-count.html>`_
|
|
865
868
|
|
|
866
869
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
867
870
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -979,23 +982,24 @@ class Elasticsearch(BaseClient):
|
|
|
979
982
|
pipeline: t.Optional[str] = None,
|
|
980
983
|
pretty: t.Optional[bool] = None,
|
|
981
984
|
refresh: t.Optional[
|
|
982
|
-
t.Union[
|
|
985
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
983
986
|
] = None,
|
|
984
987
|
routing: t.Optional[str] = None,
|
|
985
|
-
timeout: t.Optional[t.Union[
|
|
988
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
986
989
|
version: t.Optional[int] = None,
|
|
987
990
|
version_type: t.Optional[
|
|
988
|
-
t.Union[
|
|
991
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
989
992
|
] = None,
|
|
990
993
|
wait_for_active_shards: t.Optional[
|
|
991
|
-
t.Union[int, t.Union[
|
|
994
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
992
995
|
] = None,
|
|
993
996
|
) -> ObjectApiResponse[t.Any]:
|
|
994
997
|
"""
|
|
995
|
-
|
|
996
|
-
|
|
998
|
+
Adds a JSON document to the specified data stream or index and makes it searchable.
|
|
999
|
+
If the target is an index and the document already exists, the request updates
|
|
1000
|
+
the document and increments its version.
|
|
997
1001
|
|
|
998
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1002
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-index_.html>`_
|
|
999
1003
|
|
|
1000
1004
|
:param index: Name of the data stream or index to target. If the target doesn’t
|
|
1001
1005
|
exist and matches the name or wildcard (`*`) pattern of an index template
|
|
@@ -1084,22 +1088,22 @@ class Elasticsearch(BaseClient):
|
|
|
1084
1088
|
if_seq_no: t.Optional[int] = None,
|
|
1085
1089
|
pretty: t.Optional[bool] = None,
|
|
1086
1090
|
refresh: t.Optional[
|
|
1087
|
-
t.Union[
|
|
1091
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
1088
1092
|
] = None,
|
|
1089
1093
|
routing: t.Optional[str] = None,
|
|
1090
|
-
timeout: t.Optional[t.Union[
|
|
1094
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1091
1095
|
version: t.Optional[int] = None,
|
|
1092
1096
|
version_type: t.Optional[
|
|
1093
|
-
t.Union[
|
|
1097
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1094
1098
|
] = None,
|
|
1095
1099
|
wait_for_active_shards: t.Optional[
|
|
1096
|
-
t.Union[int, t.Union[
|
|
1100
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
1097
1101
|
] = None,
|
|
1098
1102
|
) -> ObjectApiResponse[t.Any]:
|
|
1099
1103
|
"""
|
|
1100
|
-
Removes a document from the index.
|
|
1104
|
+
Removes a JSON document from the specified index.
|
|
1101
1105
|
|
|
1102
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1106
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-delete.html>`_
|
|
1103
1107
|
|
|
1104
1108
|
:param index: Name of the target index.
|
|
1105
1109
|
:param id: Unique identifier for the document.
|
|
@@ -1173,16 +1177,16 @@ class Elasticsearch(BaseClient):
|
|
|
1173
1177
|
allow_no_indices: t.Optional[bool] = None,
|
|
1174
1178
|
analyze_wildcard: t.Optional[bool] = None,
|
|
1175
1179
|
analyzer: t.Optional[str] = None,
|
|
1176
|
-
conflicts: t.Optional[t.Union[
|
|
1177
|
-
default_operator: t.Optional[t.Union[
|
|
1180
|
+
conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None,
|
|
1181
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
1178
1182
|
df: t.Optional[str] = None,
|
|
1179
1183
|
error_trace: t.Optional[bool] = None,
|
|
1180
1184
|
expand_wildcards: t.Optional[
|
|
1181
1185
|
t.Union[
|
|
1182
1186
|
t.Sequence[
|
|
1183
|
-
t.Union[
|
|
1187
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
1184
1188
|
],
|
|
1185
|
-
t.Union[
|
|
1189
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
1186
1190
|
]
|
|
1187
1191
|
] = None,
|
|
1188
1192
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1199,31 +1203,29 @@ class Elasticsearch(BaseClient):
|
|
|
1199
1203
|
request_cache: t.Optional[bool] = None,
|
|
1200
1204
|
requests_per_second: t.Optional[float] = None,
|
|
1201
1205
|
routing: t.Optional[str] = None,
|
|
1202
|
-
scroll: t.Optional[t.Union[
|
|
1206
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1203
1207
|
scroll_size: t.Optional[int] = None,
|
|
1204
|
-
search_timeout: t.Optional[
|
|
1205
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
1206
|
-
] = None,
|
|
1208
|
+
search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1207
1209
|
search_type: t.Optional[
|
|
1208
|
-
t.Union[
|
|
1210
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
1209
1211
|
] = None,
|
|
1210
1212
|
slice: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
1211
|
-
slices: t.Optional[t.Union[int, t.Union[
|
|
1213
|
+
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
1212
1214
|
sort: t.Optional[t.Sequence[str]] = None,
|
|
1213
1215
|
stats: t.Optional[t.Sequence[str]] = None,
|
|
1214
1216
|
terminate_after: t.Optional[int] = None,
|
|
1215
|
-
timeout: t.Optional[t.Union[
|
|
1217
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1216
1218
|
version: t.Optional[bool] = None,
|
|
1217
1219
|
wait_for_active_shards: t.Optional[
|
|
1218
|
-
t.Union[int, t.Union[
|
|
1220
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
1219
1221
|
] = None,
|
|
1220
1222
|
wait_for_completion: t.Optional[bool] = None,
|
|
1221
1223
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1222
1224
|
) -> ObjectApiResponse[t.Any]:
|
|
1223
1225
|
"""
|
|
1224
|
-
Deletes documents
|
|
1226
|
+
Deletes documents that match the specified query.
|
|
1225
1227
|
|
|
1226
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1228
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-delete-by-query.html>`_
|
|
1227
1229
|
|
|
1228
1230
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
1229
1231
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -1401,7 +1403,7 @@ class Elasticsearch(BaseClient):
|
|
|
1401
1403
|
"""
|
|
1402
1404
|
Changes the number of requests per second for a particular Delete By Query operation.
|
|
1403
1405
|
|
|
1404
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1406
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-delete-by-query.html>`_
|
|
1405
1407
|
|
|
1406
1408
|
:param task_id: The ID for the task.
|
|
1407
1409
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -1440,16 +1442,14 @@ class Elasticsearch(BaseClient):
|
|
|
1440
1442
|
error_trace: t.Optional[bool] = None,
|
|
1441
1443
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1442
1444
|
human: t.Optional[bool] = None,
|
|
1443
|
-
master_timeout: t.Optional[
|
|
1444
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
1445
|
-
] = None,
|
|
1445
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1446
1446
|
pretty: t.Optional[bool] = None,
|
|
1447
|
-
timeout: t.Optional[t.Union[
|
|
1447
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1448
1448
|
) -> ObjectApiResponse[t.Any]:
|
|
1449
1449
|
"""
|
|
1450
|
-
Deletes a script.
|
|
1450
|
+
Deletes a stored script or search template.
|
|
1451
1451
|
|
|
1452
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1452
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
1453
1453
|
|
|
1454
1454
|
:param id: Identifier for the stored script or search template.
|
|
1455
1455
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -1511,13 +1511,13 @@ class Elasticsearch(BaseClient):
|
|
|
1511
1511
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1512
1512
|
version: t.Optional[int] = None,
|
|
1513
1513
|
version_type: t.Optional[
|
|
1514
|
-
t.Union[
|
|
1514
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1515
1515
|
] = None,
|
|
1516
1516
|
) -> HeadApiResponse:
|
|
1517
1517
|
"""
|
|
1518
|
-
|
|
1518
|
+
Checks if a document in an index exists.
|
|
1519
1519
|
|
|
1520
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1520
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
1521
1521
|
|
|
1522
1522
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1523
1523
|
wildcards (`*`).
|
|
@@ -1612,13 +1612,13 @@ class Elasticsearch(BaseClient):
|
|
|
1612
1612
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1613
1613
|
version: t.Optional[int] = None,
|
|
1614
1614
|
version_type: t.Optional[
|
|
1615
|
-
t.Union[
|
|
1615
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1616
1616
|
] = None,
|
|
1617
1617
|
) -> HeadApiResponse:
|
|
1618
1618
|
"""
|
|
1619
|
-
|
|
1619
|
+
Checks if a document's `_source` is stored.
|
|
1620
1620
|
|
|
1621
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1621
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
1622
1622
|
|
|
1623
1623
|
:param index: Comma-separated list of data streams, indices, and aliases. Supports
|
|
1624
1624
|
wildcards (`*`).
|
|
@@ -1698,7 +1698,7 @@ class Elasticsearch(BaseClient):
|
|
|
1698
1698
|
id: str,
|
|
1699
1699
|
analyze_wildcard: t.Optional[bool] = None,
|
|
1700
1700
|
analyzer: t.Optional[str] = None,
|
|
1701
|
-
default_operator: t.Optional[t.Union[
|
|
1701
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
1702
1702
|
df: t.Optional[str] = None,
|
|
1703
1703
|
error_trace: t.Optional[bool] = None,
|
|
1704
1704
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1716,9 +1716,10 @@ class Elasticsearch(BaseClient):
|
|
|
1716
1716
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1717
1717
|
) -> ObjectApiResponse[t.Any]:
|
|
1718
1718
|
"""
|
|
1719
|
-
Returns information about why a specific matches (or doesn
|
|
1719
|
+
Returns information about why a specific document matches (or doesn’t match)
|
|
1720
|
+
a query.
|
|
1720
1721
|
|
|
1721
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1722
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-explain.html>`_
|
|
1722
1723
|
|
|
1723
1724
|
:param index: Index names used to limit the request. Only a single index name
|
|
1724
1725
|
can be provided to this parameter.
|
|
@@ -1816,9 +1817,9 @@ class Elasticsearch(BaseClient):
|
|
|
1816
1817
|
expand_wildcards: t.Optional[
|
|
1817
1818
|
t.Union[
|
|
1818
1819
|
t.Sequence[
|
|
1819
|
-
t.Union[
|
|
1820
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
1820
1821
|
],
|
|
1821
|
-
t.Union[
|
|
1822
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
1822
1823
|
]
|
|
1823
1824
|
] = None,
|
|
1824
1825
|
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1835,9 +1836,12 @@ class Elasticsearch(BaseClient):
|
|
|
1835
1836
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1836
1837
|
) -> ObjectApiResponse[t.Any]:
|
|
1837
1838
|
"""
|
|
1838
|
-
|
|
1839
|
+
The field capabilities API returns the information about the capabilities of
|
|
1840
|
+
fields among multiple indices. The field capabilities API returns runtime fields
|
|
1841
|
+
like any other field. For example, a runtime field with a type of keyword is
|
|
1842
|
+
returned as any other field that belongs to the `keyword` family.
|
|
1839
1843
|
|
|
1840
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1844
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-field-caps.html>`_
|
|
1841
1845
|
|
|
1842
1846
|
:param index: Comma-separated list of data streams, indices, and aliases used
|
|
1843
1847
|
to limit the request. Supports wildcards (*). To target all data streams
|
|
@@ -1947,13 +1951,13 @@ class Elasticsearch(BaseClient):
|
|
|
1947
1951
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1948
1952
|
version: t.Optional[int] = None,
|
|
1949
1953
|
version_type: t.Optional[
|
|
1950
|
-
t.Union[
|
|
1954
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
1951
1955
|
] = None,
|
|
1952
1956
|
) -> ObjectApiResponse[t.Any]:
|
|
1953
1957
|
"""
|
|
1954
1958
|
Returns a document.
|
|
1955
1959
|
|
|
1956
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
1960
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
1957
1961
|
|
|
1958
1962
|
:param index: Name of the index that contains the document.
|
|
1959
1963
|
:param id: Unique identifier of the document.
|
|
@@ -2036,15 +2040,13 @@ class Elasticsearch(BaseClient):
|
|
|
2036
2040
|
error_trace: t.Optional[bool] = None,
|
|
2037
2041
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2038
2042
|
human: t.Optional[bool] = None,
|
|
2039
|
-
master_timeout: t.Optional[
|
|
2040
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
2041
|
-
] = None,
|
|
2043
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2042
2044
|
pretty: t.Optional[bool] = None,
|
|
2043
2045
|
) -> ObjectApiResponse[t.Any]:
|
|
2044
2046
|
"""
|
|
2045
|
-
|
|
2047
|
+
Retrieves a stored script or search template.
|
|
2046
2048
|
|
|
2047
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2049
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
2048
2050
|
|
|
2049
2051
|
:param id: Identifier for the stored script or search template.
|
|
2050
2052
|
:param master_timeout: Specify timeout for connection to master
|
|
@@ -2086,7 +2088,7 @@ class Elasticsearch(BaseClient):
|
|
|
2086
2088
|
"""
|
|
2087
2089
|
Returns all script contexts.
|
|
2088
2090
|
|
|
2089
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
2091
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.15/painless-contexts.html>`_
|
|
2090
2092
|
"""
|
|
2091
2093
|
__path_parts: t.Dict[str, str] = {}
|
|
2092
2094
|
__path = "/_script_context"
|
|
@@ -2121,7 +2123,7 @@ class Elasticsearch(BaseClient):
|
|
|
2121
2123
|
"""
|
|
2122
2124
|
Returns available script types, languages and contexts
|
|
2123
2125
|
|
|
2124
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2126
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
2125
2127
|
"""
|
|
2126
2128
|
__path_parts: t.Dict[str, str] = {}
|
|
2127
2129
|
__path = "/_script_language"
|
|
@@ -2170,13 +2172,13 @@ class Elasticsearch(BaseClient):
|
|
|
2170
2172
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2171
2173
|
version: t.Optional[int] = None,
|
|
2172
2174
|
version_type: t.Optional[
|
|
2173
|
-
t.Union[
|
|
2175
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
2174
2176
|
] = None,
|
|
2175
2177
|
) -> ObjectApiResponse[t.Any]:
|
|
2176
2178
|
"""
|
|
2177
2179
|
Returns the source of a document.
|
|
2178
2180
|
|
|
2179
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2181
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html>`_
|
|
2180
2182
|
|
|
2181
2183
|
:param index: Name of the index that contains the document.
|
|
2182
2184
|
:param id: Unique identifier of the document.
|
|
@@ -2253,13 +2255,13 @@ class Elasticsearch(BaseClient):
|
|
|
2253
2255
|
human: t.Optional[bool] = None,
|
|
2254
2256
|
pretty: t.Optional[bool] = None,
|
|
2255
2257
|
size: t.Optional[int] = None,
|
|
2256
|
-
timeout: t.Optional[t.Union[
|
|
2258
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2257
2259
|
verbose: t.Optional[bool] = None,
|
|
2258
2260
|
) -> ObjectApiResponse[t.Any]:
|
|
2259
2261
|
"""
|
|
2260
2262
|
Returns the health of the cluster.
|
|
2261
2263
|
|
|
2262
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2264
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/health-api.html>`_
|
|
2263
2265
|
|
|
2264
2266
|
:param feature: A feature of the cluster, as returned by the top-level health
|
|
2265
2267
|
report API.
|
|
@@ -2314,27 +2316,29 @@ class Elasticsearch(BaseClient):
|
|
|
2314
2316
|
human: t.Optional[bool] = None,
|
|
2315
2317
|
if_primary_term: t.Optional[int] = None,
|
|
2316
2318
|
if_seq_no: t.Optional[int] = None,
|
|
2317
|
-
op_type: t.Optional[t.Union[
|
|
2319
|
+
op_type: t.Optional[t.Union[str, t.Literal["create", "index"]]] = None,
|
|
2318
2320
|
pipeline: t.Optional[str] = None,
|
|
2319
2321
|
pretty: t.Optional[bool] = None,
|
|
2320
2322
|
refresh: t.Optional[
|
|
2321
|
-
t.Union[
|
|
2323
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
2322
2324
|
] = None,
|
|
2323
2325
|
require_alias: t.Optional[bool] = None,
|
|
2324
2326
|
routing: t.Optional[str] = None,
|
|
2325
|
-
timeout: t.Optional[t.Union[
|
|
2327
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2326
2328
|
version: t.Optional[int] = None,
|
|
2327
2329
|
version_type: t.Optional[
|
|
2328
|
-
t.Union[
|
|
2330
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
2329
2331
|
] = None,
|
|
2330
2332
|
wait_for_active_shards: t.Optional[
|
|
2331
|
-
t.Union[int, t.Union[
|
|
2333
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
2332
2334
|
] = None,
|
|
2333
2335
|
) -> ObjectApiResponse[t.Any]:
|
|
2334
2336
|
"""
|
|
2335
|
-
|
|
2337
|
+
Adds a JSON document to the specified data stream or index and makes it searchable.
|
|
2338
|
+
If the target is an index and the document already exists, the request updates
|
|
2339
|
+
the document and increments its version.
|
|
2336
2340
|
|
|
2337
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2341
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-index_.html>`_
|
|
2338
2342
|
|
|
2339
2343
|
:param index: Name of the data stream or index to target.
|
|
2340
2344
|
:param document:
|
|
@@ -2443,7 +2447,7 @@ class Elasticsearch(BaseClient):
|
|
|
2443
2447
|
"""
|
|
2444
2448
|
Returns basic information about the cluster.
|
|
2445
2449
|
|
|
2446
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2450
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index.html>`_
|
|
2447
2451
|
"""
|
|
2448
2452
|
__path_parts: t.Dict[str, str] = {}
|
|
2449
2453
|
__path = "/"
|
|
@@ -2499,7 +2503,7 @@ class Elasticsearch(BaseClient):
|
|
|
2499
2503
|
"""
|
|
2500
2504
|
Performs a kNN search.
|
|
2501
2505
|
|
|
2502
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2506
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-search.html>`_
|
|
2503
2507
|
|
|
2504
2508
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
2505
2509
|
to perform the operation on all indices
|
|
@@ -2600,7 +2604,7 @@ class Elasticsearch(BaseClient):
|
|
|
2600
2604
|
"""
|
|
2601
2605
|
Allows to get multiple documents in one request.
|
|
2602
2606
|
|
|
2603
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2607
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-multi-get.html>`_
|
|
2604
2608
|
|
|
2605
2609
|
:param index: Name of the index to retrieve documents from when `ids` are specified,
|
|
2606
2610
|
or when a document in the `docs` array does not specify an index.
|
|
@@ -2697,15 +2701,16 @@ class Elasticsearch(BaseClient):
|
|
|
2697
2701
|
expand_wildcards: t.Optional[
|
|
2698
2702
|
t.Union[
|
|
2699
2703
|
t.Sequence[
|
|
2700
|
-
t.Union[
|
|
2704
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
2701
2705
|
],
|
|
2702
|
-
t.Union[
|
|
2706
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
2703
2707
|
]
|
|
2704
2708
|
] = None,
|
|
2705
2709
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2706
2710
|
human: t.Optional[bool] = None,
|
|
2707
2711
|
ignore_throttled: t.Optional[bool] = None,
|
|
2708
2712
|
ignore_unavailable: t.Optional[bool] = None,
|
|
2713
|
+
include_named_queries_score: t.Optional[bool] = None,
|
|
2709
2714
|
max_concurrent_searches: t.Optional[int] = None,
|
|
2710
2715
|
max_concurrent_shard_requests: t.Optional[int] = None,
|
|
2711
2716
|
pre_filter_shard_size: t.Optional[int] = None,
|
|
@@ -2713,14 +2718,14 @@ class Elasticsearch(BaseClient):
|
|
|
2713
2718
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
2714
2719
|
routing: t.Optional[str] = None,
|
|
2715
2720
|
search_type: t.Optional[
|
|
2716
|
-
t.Union[
|
|
2721
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
2717
2722
|
] = None,
|
|
2718
2723
|
typed_keys: t.Optional[bool] = None,
|
|
2719
2724
|
) -> ObjectApiResponse[t.Any]:
|
|
2720
2725
|
"""
|
|
2721
2726
|
Allows to execute several search operations in one request.
|
|
2722
2727
|
|
|
2723
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2728
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-multi-search.html>`_
|
|
2724
2729
|
|
|
2725
2730
|
:param searches:
|
|
2726
2731
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
@@ -2739,6 +2744,13 @@ class Elasticsearch(BaseClient):
|
|
|
2739
2744
|
when frozen.
|
|
2740
2745
|
:param ignore_unavailable: If true, missing or closed indices are not included
|
|
2741
2746
|
in the response.
|
|
2747
|
+
:param include_named_queries_score: Indicates whether hit.matched_queries should
|
|
2748
|
+
be rendered as a map that includes the name of the matched query associated
|
|
2749
|
+
with its score (true) or as an array containing the name of the matched queries
|
|
2750
|
+
(false) This functionality reruns each named query on every hit in a search
|
|
2751
|
+
response. Typically, this adds a small overhead to a request. However, using
|
|
2752
|
+
computationally expensive named queries on a large number of hits may add
|
|
2753
|
+
significant overhead.
|
|
2742
2754
|
:param max_concurrent_searches: Maximum number of concurrent searches the multi
|
|
2743
2755
|
search API can execute.
|
|
2744
2756
|
:param max_concurrent_shard_requests: Maximum number of concurrent shard requests
|
|
@@ -2788,6 +2800,8 @@ class Elasticsearch(BaseClient):
|
|
|
2788
2800
|
__query["ignore_throttled"] = ignore_throttled
|
|
2789
2801
|
if ignore_unavailable is not None:
|
|
2790
2802
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
2803
|
+
if include_named_queries_score is not None:
|
|
2804
|
+
__query["include_named_queries_score"] = include_named_queries_score
|
|
2791
2805
|
if max_concurrent_searches is not None:
|
|
2792
2806
|
__query["max_concurrent_searches"] = max_concurrent_searches
|
|
2793
2807
|
if max_concurrent_shard_requests is not None:
|
|
@@ -2836,14 +2850,14 @@ class Elasticsearch(BaseClient):
|
|
|
2836
2850
|
pretty: t.Optional[bool] = None,
|
|
2837
2851
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
2838
2852
|
search_type: t.Optional[
|
|
2839
|
-
t.Union[
|
|
2853
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
2840
2854
|
] = None,
|
|
2841
2855
|
typed_keys: t.Optional[bool] = None,
|
|
2842
2856
|
) -> ObjectApiResponse[t.Any]:
|
|
2843
2857
|
"""
|
|
2844
|
-
|
|
2858
|
+
Runs multiple templated searches with a single request.
|
|
2845
2859
|
|
|
2846
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2860
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-multi-search.html>`_
|
|
2847
2861
|
|
|
2848
2862
|
:param search_templates:
|
|
2849
2863
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
@@ -2931,14 +2945,14 @@ class Elasticsearch(BaseClient):
|
|
|
2931
2945
|
term_statistics: t.Optional[bool] = None,
|
|
2932
2946
|
version: t.Optional[int] = None,
|
|
2933
2947
|
version_type: t.Optional[
|
|
2934
|
-
t.Union[
|
|
2948
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
2935
2949
|
] = None,
|
|
2936
2950
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2937
2951
|
) -> ObjectApiResponse[t.Any]:
|
|
2938
2952
|
"""
|
|
2939
2953
|
Returns multiple termvectors in one request.
|
|
2940
2954
|
|
|
2941
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
2955
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-multi-termvectors.html>`_
|
|
2942
2956
|
|
|
2943
2957
|
:param index: Name of the index that contains the documents.
|
|
2944
2958
|
:param docs: Array of existing or artificial documents.
|
|
@@ -3025,14 +3039,14 @@ class Elasticsearch(BaseClient):
|
|
|
3025
3039
|
self,
|
|
3026
3040
|
*,
|
|
3027
3041
|
index: t.Union[str, t.Sequence[str]],
|
|
3028
|
-
keep_alive: t.Union[
|
|
3042
|
+
keep_alive: t.Union[str, t.Literal[-1], t.Literal[0]],
|
|
3029
3043
|
error_trace: t.Optional[bool] = None,
|
|
3030
3044
|
expand_wildcards: t.Optional[
|
|
3031
3045
|
t.Union[
|
|
3032
3046
|
t.Sequence[
|
|
3033
|
-
t.Union[
|
|
3047
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3034
3048
|
],
|
|
3035
|
-
t.Union[
|
|
3049
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3036
3050
|
]
|
|
3037
3051
|
] = None,
|
|
3038
3052
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -3043,9 +3057,15 @@ class Elasticsearch(BaseClient):
|
|
|
3043
3057
|
routing: t.Optional[str] = None,
|
|
3044
3058
|
) -> ObjectApiResponse[t.Any]:
|
|
3045
3059
|
"""
|
|
3046
|
-
|
|
3060
|
+
A search request by default executes against the most recent visible data of
|
|
3061
|
+
the target indices, which is called point in time. Elasticsearch pit (point in
|
|
3062
|
+
time) is a lightweight view into the state of the data as it existed when initiated.
|
|
3063
|
+
In some cases, it’s preferred to perform multiple search requests using the same
|
|
3064
|
+
point in time. For example, if refreshes happen between `search_after` requests,
|
|
3065
|
+
then the results of those requests might not be consistent as changes happening
|
|
3066
|
+
between searches are only visible to the more recent point in time.
|
|
3047
3067
|
|
|
3048
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3068
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/point-in-time-api.html>`_
|
|
3049
3069
|
|
|
3050
3070
|
:param index: A comma-separated list of index names to open point in time; use
|
|
3051
3071
|
`_all` or empty string to perform the operation on all indices
|
|
@@ -3107,17 +3127,15 @@ class Elasticsearch(BaseClient):
|
|
|
3107
3127
|
error_trace: t.Optional[bool] = None,
|
|
3108
3128
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3109
3129
|
human: t.Optional[bool] = None,
|
|
3110
|
-
master_timeout: t.Optional[
|
|
3111
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
3112
|
-
] = None,
|
|
3130
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3113
3131
|
pretty: t.Optional[bool] = None,
|
|
3114
|
-
timeout: t.Optional[t.Union[
|
|
3132
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3115
3133
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3116
3134
|
) -> ObjectApiResponse[t.Any]:
|
|
3117
3135
|
"""
|
|
3118
|
-
Creates or updates a script.
|
|
3136
|
+
Creates or updates a stored script or search template.
|
|
3119
3137
|
|
|
3120
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3138
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/modules-scripting.html>`_
|
|
3121
3139
|
|
|
3122
3140
|
:param id: Identifier for the stored script or search template. Must be unique
|
|
3123
3141
|
within the cluster.
|
|
@@ -3186,9 +3204,9 @@ class Elasticsearch(BaseClient):
|
|
|
3186
3204
|
expand_wildcards: t.Optional[
|
|
3187
3205
|
t.Union[
|
|
3188
3206
|
t.Sequence[
|
|
3189
|
-
t.Union[
|
|
3207
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3190
3208
|
],
|
|
3191
|
-
t.Union[
|
|
3209
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3192
3210
|
]
|
|
3193
3211
|
] = None,
|
|
3194
3212
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -3200,10 +3218,10 @@ class Elasticsearch(BaseClient):
|
|
|
3200
3218
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3201
3219
|
) -> ObjectApiResponse[t.Any]:
|
|
3202
3220
|
"""
|
|
3203
|
-
|
|
3204
|
-
search queries
|
|
3221
|
+
Enables you to evaluate the quality of ranked search results over a set of typical
|
|
3222
|
+
search queries.
|
|
3205
3223
|
|
|
3206
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3224
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-rank-eval.html>`_
|
|
3207
3225
|
|
|
3208
3226
|
:param requests: A set of typical search requests, together with their provided
|
|
3209
3227
|
ratings.
|
|
@@ -3274,7 +3292,7 @@ class Elasticsearch(BaseClient):
|
|
|
3274
3292
|
*,
|
|
3275
3293
|
dest: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3276
3294
|
source: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3277
|
-
conflicts: t.Optional[t.Union[
|
|
3295
|
+
conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None,
|
|
3278
3296
|
error_trace: t.Optional[bool] = None,
|
|
3279
3297
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3280
3298
|
human: t.Optional[bool] = None,
|
|
@@ -3284,12 +3302,12 @@ class Elasticsearch(BaseClient):
|
|
|
3284
3302
|
requests_per_second: t.Optional[float] = None,
|
|
3285
3303
|
require_alias: t.Optional[bool] = None,
|
|
3286
3304
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3287
|
-
scroll: t.Optional[t.Union[
|
|
3305
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3288
3306
|
size: t.Optional[int] = None,
|
|
3289
|
-
slices: t.Optional[t.Union[int, t.Union[
|
|
3290
|
-
timeout: t.Optional[t.Union[
|
|
3307
|
+
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
3308
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3291
3309
|
wait_for_active_shards: t.Optional[
|
|
3292
|
-
t.Union[int, t.Union[
|
|
3310
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
3293
3311
|
] = None,
|
|
3294
3312
|
wait_for_completion: t.Optional[bool] = None,
|
|
3295
3313
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
@@ -3299,7 +3317,7 @@ class Elasticsearch(BaseClient):
|
|
|
3299
3317
|
source documents by a query, changing the destination index settings, or fetching
|
|
3300
3318
|
the documents from a remote cluster.
|
|
3301
3319
|
|
|
3302
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3320
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-reindex.html>`_
|
|
3303
3321
|
|
|
3304
3322
|
:param dest: The destination you are copying to.
|
|
3305
3323
|
:param source: The source you are copying from.
|
|
@@ -3393,9 +3411,9 @@ class Elasticsearch(BaseClient):
|
|
|
3393
3411
|
requests_per_second: t.Optional[float] = None,
|
|
3394
3412
|
) -> ObjectApiResponse[t.Any]:
|
|
3395
3413
|
"""
|
|
3396
|
-
|
|
3414
|
+
Copies documents from a source to a destination.
|
|
3397
3415
|
|
|
3398
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3416
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-reindex.html>`_
|
|
3399
3417
|
|
|
3400
3418
|
:param task_id: Identifier for the task.
|
|
3401
3419
|
:param requests_per_second: The throttle for this request in sub-requests per
|
|
@@ -3444,9 +3462,9 @@ class Elasticsearch(BaseClient):
|
|
|
3444
3462
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3445
3463
|
) -> ObjectApiResponse[t.Any]:
|
|
3446
3464
|
"""
|
|
3447
|
-
|
|
3465
|
+
Renders a search template as a search request body.
|
|
3448
3466
|
|
|
3449
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3467
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/render-search-template-api.html>`_
|
|
3450
3468
|
|
|
3451
3469
|
:param id: ID of the search template to render. If no `source` is specified,
|
|
3452
3470
|
this or the `id` request body parameter is required.
|
|
@@ -3512,9 +3530,9 @@ class Elasticsearch(BaseClient):
|
|
|
3512
3530
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3513
3531
|
) -> ObjectApiResponse[t.Any]:
|
|
3514
3532
|
"""
|
|
3515
|
-
|
|
3533
|
+
Runs a script and returns a result.
|
|
3516
3534
|
|
|
3517
|
-
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.
|
|
3535
|
+
`<https://www.elastic.co/guide/en/elasticsearch/painless/8.15/painless-execute-api.html>`_
|
|
3518
3536
|
|
|
3519
3537
|
:param context: The context that the script should run in.
|
|
3520
3538
|
:param context_setup: Additional parameters for the `context`.
|
|
@@ -3566,13 +3584,13 @@ class Elasticsearch(BaseClient):
|
|
|
3566
3584
|
human: t.Optional[bool] = None,
|
|
3567
3585
|
pretty: t.Optional[bool] = None,
|
|
3568
3586
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
3569
|
-
scroll: t.Optional[t.Union[
|
|
3587
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3570
3588
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3571
3589
|
) -> ObjectApiResponse[t.Any]:
|
|
3572
3590
|
"""
|
|
3573
3591
|
Allows to retrieve a large numbers of results from a single search request.
|
|
3574
3592
|
|
|
3575
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3593
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-request-body.html#request-body-search-scroll>`_
|
|
3576
3594
|
|
|
3577
3595
|
:param scroll_id: Scroll ID of the search.
|
|
3578
3596
|
:param rest_total_hits_as_int: If true, the API response’s hit.total property
|
|
@@ -3674,16 +3692,16 @@ class Elasticsearch(BaseClient):
|
|
|
3674
3692
|
batched_reduce_size: t.Optional[int] = None,
|
|
3675
3693
|
ccs_minimize_roundtrips: t.Optional[bool] = None,
|
|
3676
3694
|
collapse: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3677
|
-
default_operator: t.Optional[t.Union[
|
|
3695
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
3678
3696
|
df: t.Optional[str] = None,
|
|
3679
3697
|
docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
|
|
3680
3698
|
error_trace: t.Optional[bool] = None,
|
|
3681
3699
|
expand_wildcards: t.Optional[
|
|
3682
3700
|
t.Union[
|
|
3683
3701
|
t.Sequence[
|
|
3684
|
-
t.Union[
|
|
3702
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3685
3703
|
],
|
|
3686
|
-
t.Union[
|
|
3704
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3687
3705
|
]
|
|
3688
3706
|
] = None,
|
|
3689
3707
|
explain: t.Optional[bool] = None,
|
|
@@ -3696,6 +3714,7 @@ class Elasticsearch(BaseClient):
|
|
|
3696
3714
|
human: t.Optional[bool] = None,
|
|
3697
3715
|
ignore_throttled: t.Optional[bool] = None,
|
|
3698
3716
|
ignore_unavailable: t.Optional[bool] = None,
|
|
3717
|
+
include_named_queries_score: t.Optional[bool] = None,
|
|
3699
3718
|
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
|
|
3700
3719
|
knn: t.Optional[
|
|
3701
3720
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
@@ -3722,12 +3741,12 @@ class Elasticsearch(BaseClient):
|
|
|
3722
3741
|
routing: t.Optional[str] = None,
|
|
3723
3742
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
3724
3743
|
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
3725
|
-
scroll: t.Optional[t.Union[
|
|
3744
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3726
3745
|
search_after: t.Optional[
|
|
3727
3746
|
t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
|
|
3728
3747
|
] = None,
|
|
3729
3748
|
search_type: t.Optional[
|
|
3730
|
-
t.Union[
|
|
3749
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
3731
3750
|
] = None,
|
|
3732
3751
|
seq_no_primary_term: t.Optional[bool] = None,
|
|
3733
3752
|
size: t.Optional[int] = None,
|
|
@@ -3746,7 +3765,7 @@ class Elasticsearch(BaseClient):
|
|
|
3746
3765
|
suggest: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3747
3766
|
suggest_field: t.Optional[str] = None,
|
|
3748
3767
|
suggest_mode: t.Optional[
|
|
3749
|
-
t.Union[
|
|
3768
|
+
t.Union[str, t.Literal["always", "missing", "popular"]]
|
|
3750
3769
|
] = None,
|
|
3751
3770
|
suggest_size: t.Optional[int] = None,
|
|
3752
3771
|
suggest_text: t.Optional[str] = None,
|
|
@@ -3759,9 +3778,11 @@ class Elasticsearch(BaseClient):
|
|
|
3759
3778
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3760
3779
|
) -> ObjectApiResponse[t.Any]:
|
|
3761
3780
|
"""
|
|
3762
|
-
Returns
|
|
3781
|
+
Returns search hits that match the query defined in the request. You can provide
|
|
3782
|
+
search queries using the `q` query string parameter or the request body. If both
|
|
3783
|
+
are specified, only the query parameter is used.
|
|
3763
3784
|
|
|
3764
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
3785
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-search.html>`_
|
|
3765
3786
|
|
|
3766
3787
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
3767
3788
|
Supports wildcards (`*`). To search all data streams and indices, omit this
|
|
@@ -3821,6 +3842,13 @@ class Elasticsearch(BaseClient):
|
|
|
3821
3842
|
be ignored when frozen.
|
|
3822
3843
|
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
3823
3844
|
a missing or closed index.
|
|
3845
|
+
:param include_named_queries_score: Indicates whether hit.matched_queries should
|
|
3846
|
+
be rendered as a map that includes the name of the matched query associated
|
|
3847
|
+
with its score (true) or as an array containing the name of the matched queries
|
|
3848
|
+
(false) This functionality reruns each named query on every hit in a search
|
|
3849
|
+
response. Typically, this adds a small overhead to a request. However, using
|
|
3850
|
+
computationally expensive named queries on a large number of hits may add
|
|
3851
|
+
significant overhead.
|
|
3824
3852
|
:param indices_boost: Boosts the _score of documents from specified indices.
|
|
3825
3853
|
:param knn: Defines the approximate kNN search to run.
|
|
3826
3854
|
:param lenient: If `true`, format-based query failures (such as providing text
|
|
@@ -4002,6 +4030,8 @@ class Elasticsearch(BaseClient):
|
|
|
4002
4030
|
__query["ignore_throttled"] = ignore_throttled
|
|
4003
4031
|
if ignore_unavailable is not None:
|
|
4004
4032
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
4033
|
+
if include_named_queries_score is not None:
|
|
4034
|
+
__query["include_named_queries_score"] = include_named_queries_score
|
|
4005
4035
|
if lenient is not None:
|
|
4006
4036
|
__query["lenient"] = lenient
|
|
4007
4037
|
if max_concurrent_shard_requests is not None:
|
|
@@ -4159,10 +4189,10 @@ class Elasticsearch(BaseClient):
|
|
|
4159
4189
|
extent: t.Optional[int] = None,
|
|
4160
4190
|
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4161
4191
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4162
|
-
grid_agg: t.Optional[t.Union[
|
|
4192
|
+
grid_agg: t.Optional[t.Union[str, t.Literal["geohex", "geotile"]]] = None,
|
|
4163
4193
|
grid_precision: t.Optional[int] = None,
|
|
4164
4194
|
grid_type: t.Optional[
|
|
4165
|
-
t.Union[
|
|
4195
|
+
t.Union[str, t.Literal["centroid", "grid", "point"]]
|
|
4166
4196
|
] = None,
|
|
4167
4197
|
human: t.Optional[bool] = None,
|
|
4168
4198
|
pretty: t.Optional[bool] = None,
|
|
@@ -4183,7 +4213,7 @@ class Elasticsearch(BaseClient):
|
|
|
4183
4213
|
Searches a vector tile for geospatial values. Returns results as a binary Mapbox
|
|
4184
4214
|
vector tile.
|
|
4185
4215
|
|
|
4186
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4216
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-vector-tile-api.html>`_
|
|
4187
4217
|
|
|
4188
4218
|
:param index: Comma-separated list of data streams, indices, or aliases to search
|
|
4189
4219
|
:param field: Field containing geospatial data to return
|
|
@@ -4321,9 +4351,9 @@ class Elasticsearch(BaseClient):
|
|
|
4321
4351
|
expand_wildcards: t.Optional[
|
|
4322
4352
|
t.Union[
|
|
4323
4353
|
t.Sequence[
|
|
4324
|
-
t.Union[
|
|
4354
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
4325
4355
|
],
|
|
4326
|
-
t.Union[
|
|
4356
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
4327
4357
|
]
|
|
4328
4358
|
] = None,
|
|
4329
4359
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -4338,7 +4368,7 @@ class Elasticsearch(BaseClient):
|
|
|
4338
4368
|
Returns information about the indices and shards that a search request would
|
|
4339
4369
|
be executed against.
|
|
4340
4370
|
|
|
4341
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4371
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-shards.html>`_
|
|
4342
4372
|
|
|
4343
4373
|
:param index: Returns the indices and shards that a search request would be executed
|
|
4344
4374
|
against.
|
|
@@ -4411,9 +4441,9 @@ class Elasticsearch(BaseClient):
|
|
|
4411
4441
|
expand_wildcards: t.Optional[
|
|
4412
4442
|
t.Union[
|
|
4413
4443
|
t.Sequence[
|
|
4414
|
-
t.Union[
|
|
4444
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
4415
4445
|
],
|
|
4416
|
-
t.Union[
|
|
4446
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
4417
4447
|
]
|
|
4418
4448
|
] = None,
|
|
4419
4449
|
explain: t.Optional[bool] = None,
|
|
@@ -4428,18 +4458,18 @@ class Elasticsearch(BaseClient):
|
|
|
4428
4458
|
profile: t.Optional[bool] = None,
|
|
4429
4459
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
4430
4460
|
routing: t.Optional[str] = None,
|
|
4431
|
-
scroll: t.Optional[t.Union[
|
|
4461
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4432
4462
|
search_type: t.Optional[
|
|
4433
|
-
t.Union[
|
|
4463
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
4434
4464
|
] = None,
|
|
4435
4465
|
source: t.Optional[str] = None,
|
|
4436
4466
|
typed_keys: t.Optional[bool] = None,
|
|
4437
4467
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4438
4468
|
) -> ObjectApiResponse[t.Any]:
|
|
4439
4469
|
"""
|
|
4440
|
-
|
|
4470
|
+
Runs a search with a search template.
|
|
4441
4471
|
|
|
4442
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4472
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-template.html>`_
|
|
4443
4473
|
|
|
4444
4474
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
4445
4475
|
Supports wildcards (*).
|
|
@@ -4565,7 +4595,7 @@ class Elasticsearch(BaseClient):
|
|
|
4565
4595
|
search_after: t.Optional[str] = None,
|
|
4566
4596
|
size: t.Optional[int] = None,
|
|
4567
4597
|
string: t.Optional[str] = None,
|
|
4568
|
-
timeout: t.Optional[t.Union[
|
|
4598
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4569
4599
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4570
4600
|
) -> ObjectApiResponse[t.Any]:
|
|
4571
4601
|
"""
|
|
@@ -4573,7 +4603,7 @@ class Elasticsearch(BaseClient):
|
|
|
4573
4603
|
the provided string. It is designed for low-latency look-ups used in auto-complete
|
|
4574
4604
|
scenarios.
|
|
4575
4605
|
|
|
4576
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4606
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-terms-enum.html>`_
|
|
4577
4607
|
|
|
4578
4608
|
:param index: Comma-separated list of data streams, indices, and index aliases
|
|
4579
4609
|
to search. Wildcard (*) expressions are supported.
|
|
@@ -4664,7 +4694,7 @@ class Elasticsearch(BaseClient):
|
|
|
4664
4694
|
term_statistics: t.Optional[bool] = None,
|
|
4665
4695
|
version: t.Optional[int] = None,
|
|
4666
4696
|
version_type: t.Optional[
|
|
4667
|
-
t.Union[
|
|
4697
|
+
t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
|
|
4668
4698
|
] = None,
|
|
4669
4699
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4670
4700
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -4672,7 +4702,7 @@ class Elasticsearch(BaseClient):
|
|
|
4672
4702
|
Returns information and statistics about terms in the fields of a particular
|
|
4673
4703
|
document.
|
|
4674
4704
|
|
|
4675
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4705
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-termvectors.html>`_
|
|
4676
4706
|
|
|
4677
4707
|
:param index: Name of the index that contains the document.
|
|
4678
4708
|
:param id: Unique identifier of the document.
|
|
@@ -4794,7 +4824,7 @@ class Elasticsearch(BaseClient):
|
|
|
4794
4824
|
lang: t.Optional[str] = None,
|
|
4795
4825
|
pretty: t.Optional[bool] = None,
|
|
4796
4826
|
refresh: t.Optional[
|
|
4797
|
-
t.Union[
|
|
4827
|
+
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
4798
4828
|
] = None,
|
|
4799
4829
|
require_alias: t.Optional[bool] = None,
|
|
4800
4830
|
retry_on_conflict: t.Optional[int] = None,
|
|
@@ -4804,17 +4834,17 @@ class Elasticsearch(BaseClient):
|
|
|
4804
4834
|
source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
|
|
4805
4835
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4806
4836
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4807
|
-
timeout: t.Optional[t.Union[
|
|
4837
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4808
4838
|
upsert: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4809
4839
|
wait_for_active_shards: t.Optional[
|
|
4810
|
-
t.Union[int, t.Union[
|
|
4840
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
4811
4841
|
] = None,
|
|
4812
4842
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4813
4843
|
) -> ObjectApiResponse[t.Any]:
|
|
4814
4844
|
"""
|
|
4815
4845
|
Updates a document with a script or partial document.
|
|
4816
4846
|
|
|
4817
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
4847
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update.html>`_
|
|
4818
4848
|
|
|
4819
4849
|
:param index: The name of the index
|
|
4820
4850
|
:param id: Document ID
|
|
@@ -4927,16 +4957,16 @@ class Elasticsearch(BaseClient):
|
|
|
4927
4957
|
allow_no_indices: t.Optional[bool] = None,
|
|
4928
4958
|
analyze_wildcard: t.Optional[bool] = None,
|
|
4929
4959
|
analyzer: t.Optional[str] = None,
|
|
4930
|
-
conflicts: t.Optional[t.Union[
|
|
4931
|
-
default_operator: t.Optional[t.Union[
|
|
4960
|
+
conflicts: t.Optional[t.Union[str, t.Literal["abort", "proceed"]]] = None,
|
|
4961
|
+
default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
|
|
4932
4962
|
df: t.Optional[str] = None,
|
|
4933
4963
|
error_trace: t.Optional[bool] = None,
|
|
4934
4964
|
expand_wildcards: t.Optional[
|
|
4935
4965
|
t.Union[
|
|
4936
4966
|
t.Sequence[
|
|
4937
|
-
t.Union[
|
|
4967
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
4938
4968
|
],
|
|
4939
|
-
t.Union[
|
|
4969
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
4940
4970
|
]
|
|
4941
4971
|
] = None,
|
|
4942
4972
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -4954,34 +4984,32 @@ class Elasticsearch(BaseClient):
|
|
|
4954
4984
|
requests_per_second: t.Optional[float] = None,
|
|
4955
4985
|
routing: t.Optional[str] = None,
|
|
4956
4986
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4957
|
-
scroll: t.Optional[t.Union[
|
|
4987
|
+
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4958
4988
|
scroll_size: t.Optional[int] = None,
|
|
4959
|
-
search_timeout: t.Optional[
|
|
4960
|
-
t.Union["t.Literal[-1]", "t.Literal[0]", str]
|
|
4961
|
-
] = None,
|
|
4989
|
+
search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4962
4990
|
search_type: t.Optional[
|
|
4963
|
-
t.Union[
|
|
4991
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
4964
4992
|
] = None,
|
|
4965
4993
|
slice: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4966
|
-
slices: t.Optional[t.Union[int, t.Union[
|
|
4994
|
+
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
4967
4995
|
sort: t.Optional[t.Sequence[str]] = None,
|
|
4968
4996
|
stats: t.Optional[t.Sequence[str]] = None,
|
|
4969
4997
|
terminate_after: t.Optional[int] = None,
|
|
4970
|
-
timeout: t.Optional[t.Union[
|
|
4998
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4971
4999
|
version: t.Optional[bool] = None,
|
|
4972
5000
|
version_type: t.Optional[bool] = None,
|
|
4973
5001
|
wait_for_active_shards: t.Optional[
|
|
4974
|
-
t.Union[int, t.Union[
|
|
5002
|
+
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
4975
5003
|
] = None,
|
|
4976
5004
|
wait_for_completion: t.Optional[bool] = None,
|
|
4977
5005
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4978
5006
|
) -> ObjectApiResponse[t.Any]:
|
|
4979
5007
|
"""
|
|
4980
5008
|
Updates documents that match the specified query. If no query is specified, performs
|
|
4981
|
-
an update on every document in the index without
|
|
4982
|
-
|
|
5009
|
+
an update on every document in the data stream or index without modifying the
|
|
5010
|
+
source, which is useful for picking up mapping changes.
|
|
4983
5011
|
|
|
4984
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5012
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update-by-query.html>`_
|
|
4985
5013
|
|
|
4986
5014
|
:param index: Comma-separated list of data streams, indices, and aliases to search.
|
|
4987
5015
|
Supports wildcards (`*`). To search all data streams or indices, omit this
|
|
@@ -5174,7 +5202,7 @@ class Elasticsearch(BaseClient):
|
|
|
5174
5202
|
"""
|
|
5175
5203
|
Changes the number of requests per second for a particular Update By Query operation.
|
|
5176
5204
|
|
|
5177
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
5205
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update-by-query.html>`_
|
|
5178
5206
|
|
|
5179
5207
|
:param task_id: The ID for the task.
|
|
5180
5208
|
:param requests_per_second: The throttle for this request in sub-requests per
|