elasticsearch 8.14.0__py3-none-any.whl → 8.15.1__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.
Files changed (97) hide show
  1. elasticsearch/_async/client/__init__.py +200 -168
  2. elasticsearch/_async/client/async_search.py +35 -20
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +785 -180
  5. elasticsearch/_async/client/ccr.py +20 -32
  6. elasticsearch/_async/client/cluster.py +87 -79
  7. elasticsearch/_async/client/connector.py +1470 -0
  8. elasticsearch/_async/client/dangling_indices.py +7 -11
  9. elasticsearch/_async/client/enrich.py +8 -8
  10. elasticsearch/_async/client/eql.py +17 -16
  11. elasticsearch/_async/client/esql.py +2 -2
  12. elasticsearch/_async/client/features.py +2 -2
  13. elasticsearch/_async/client/fleet.py +18 -17
  14. elasticsearch/_async/client/graph.py +4 -4
  15. elasticsearch/_async/client/ilm.py +36 -44
  16. elasticsearch/_async/client/indices.py +295 -317
  17. elasticsearch/_async/client/inference.py +42 -33
  18. elasticsearch/_async/client/ingest.py +197 -23
  19. elasticsearch/_async/client/license.py +18 -10
  20. elasticsearch/_async/client/logstash.py +6 -6
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +383 -176
  23. elasticsearch/_async/client/monitoring.py +2 -2
  24. elasticsearch/_async/client/nodes.py +32 -32
  25. elasticsearch/_async/client/query_rules.py +384 -0
  26. elasticsearch/_async/client/rollup.py +13 -13
  27. elasticsearch/_async/client/search_application.py +10 -10
  28. elasticsearch/_async/client/searchable_snapshots.py +9 -13
  29. elasticsearch/_async/client/security.py +577 -104
  30. elasticsearch/_async/client/shutdown.py +7 -7
  31. elasticsearch/_async/client/slm.py +11 -13
  32. elasticsearch/_async/client/snapshot.py +39 -52
  33. elasticsearch/_async/client/sql.py +12 -14
  34. elasticsearch/_async/client/ssl.py +1 -1
  35. elasticsearch/_async/client/synonyms.py +11 -9
  36. elasticsearch/_async/client/tasks.py +9 -10
  37. elasticsearch/_async/client/text_structure.py +3 -3
  38. elasticsearch/_async/client/transform.py +89 -34
  39. elasticsearch/_async/client/watcher.py +30 -15
  40. elasticsearch/_async/client/xpack.py +6 -7
  41. elasticsearch/_otel.py +24 -6
  42. elasticsearch/_sync/client/__init__.py +200 -168
  43. elasticsearch/_sync/client/async_search.py +35 -20
  44. elasticsearch/_sync/client/autoscaling.py +4 -4
  45. elasticsearch/_sync/client/cat.py +785 -180
  46. elasticsearch/_sync/client/ccr.py +20 -32
  47. elasticsearch/_sync/client/cluster.py +87 -79
  48. elasticsearch/_sync/client/connector.py +1470 -0
  49. elasticsearch/_sync/client/dangling_indices.py +7 -11
  50. elasticsearch/_sync/client/enrich.py +8 -8
  51. elasticsearch/_sync/client/eql.py +17 -16
  52. elasticsearch/_sync/client/esql.py +2 -2
  53. elasticsearch/_sync/client/features.py +2 -2
  54. elasticsearch/_sync/client/fleet.py +18 -17
  55. elasticsearch/_sync/client/graph.py +4 -4
  56. elasticsearch/_sync/client/ilm.py +36 -44
  57. elasticsearch/_sync/client/indices.py +295 -317
  58. elasticsearch/_sync/client/inference.py +42 -33
  59. elasticsearch/_sync/client/ingest.py +197 -23
  60. elasticsearch/_sync/client/license.py +18 -10
  61. elasticsearch/_sync/client/logstash.py +6 -6
  62. elasticsearch/_sync/client/migration.py +3 -3
  63. elasticsearch/_sync/client/ml.py +383 -176
  64. elasticsearch/_sync/client/monitoring.py +2 -2
  65. elasticsearch/_sync/client/nodes.py +32 -32
  66. elasticsearch/_sync/client/query_rules.py +384 -0
  67. elasticsearch/_sync/client/rollup.py +13 -13
  68. elasticsearch/_sync/client/search_application.py +10 -10
  69. elasticsearch/_sync/client/searchable_snapshots.py +9 -13
  70. elasticsearch/_sync/client/security.py +577 -104
  71. elasticsearch/_sync/client/shutdown.py +7 -7
  72. elasticsearch/_sync/client/slm.py +11 -13
  73. elasticsearch/_sync/client/snapshot.py +39 -52
  74. elasticsearch/_sync/client/sql.py +12 -14
  75. elasticsearch/_sync/client/ssl.py +1 -1
  76. elasticsearch/_sync/client/synonyms.py +11 -9
  77. elasticsearch/_sync/client/tasks.py +9 -10
  78. elasticsearch/_sync/client/text_structure.py +3 -3
  79. elasticsearch/_sync/client/transform.py +89 -34
  80. elasticsearch/_sync/client/watcher.py +30 -15
  81. elasticsearch/_sync/client/xpack.py +6 -7
  82. elasticsearch/_version.py +1 -1
  83. elasticsearch/client.py +3 -3
  84. elasticsearch/helpers/actions.py +120 -106
  85. elasticsearch/helpers/vectorstore/_async/vectorstore.py +36 -6
  86. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +36 -6
  87. elasticsearch/serializer.py +34 -0
  88. elasticsearch-8.15.1.dist-info/METADATA +177 -0
  89. elasticsearch-8.15.1.dist-info/RECORD +117 -0
  90. {elasticsearch-8.14.0.dist-info → elasticsearch-8.15.1.dist-info}/WHEEL +1 -2
  91. elasticsearch/_async/client/query_ruleset.py +0 -205
  92. elasticsearch/_sync/client/query_ruleset.py +0 -205
  93. elasticsearch-8.14.0.dist-info/METADATA +0 -161
  94. elasticsearch-8.14.0.dist-info/RECORD +0 -116
  95. elasticsearch-8.14.0.dist-info/top_level.txt +0 -1
  96. {elasticsearch-8.14.0.dist-info → elasticsearch-8.15.1.dist-info/licenses}/LICENSE +0 -0
  97. {elasticsearch-8.14.0.dist-info → elasticsearch-8.15.1.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 .query_ruleset import QueryRulesetClient
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 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.query_ruleset = QueryRulesetClient(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["t.Literal['false', 'true', 'wait_for']", bool, str]
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['all', 'index-setting']", str]]
639
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
638
640
  ] = None,
639
641
  ) -> ObjectApiResponse[t.Any]:
640
642
  """
641
- Allows to perform multiple index/update/delete operations in a single request.
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.14/docs-bulk.html>`_
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
- Explicitly clears the search context for a scroll.
743
+ Clears the search context and results for a scrolling search.
741
744
 
742
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/clear-scroll-api.html>`_
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
- Close a point in time
793
+ Closes a point-in-time.
791
794
 
792
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/point-in-time-api.html>`_
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["t.Literal['and', 'or']", str]] = None,
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["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
847
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
845
848
  ],
846
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
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.14/search-count.html>`_
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["t.Literal['false', 'true', 'wait_for']", bool, str]
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
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["t.Literal['all', 'index-setting']", str]]
996
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
994
997
  ] = None,
995
998
  ) -> ObjectApiResponse[t.Any]:
996
999
  """
997
- Creates a new document in the index. Returns a 409 response when a document with
998
- a same ID already exists in the index.
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.14/docs-index_.html>`_
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["t.Literal['false', 'true', 'wait_for']", bool, str]
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
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["t.Literal['all', 'index-setting']", str]]
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.14/docs-delete.html>`_
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["t.Literal['abort', 'proceed']", str]] = None,
1179
- default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None,
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["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1189
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1186
1190
  ],
1187
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
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["t.Literal['auto']", str]]] = None,
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['all', 'index-setting']", str]]
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 matching the provided query.
1228
+ Deletes documents that match the specified query.
1227
1229
 
1228
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-delete-by-query.html>`_
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.14/docs-delete-by-query.html>`_
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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.14/modules-scripting.html>`_
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
1516
+ t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
1517
1517
  ] = None,
1518
1518
  ) -> HeadApiResponse:
1519
1519
  """
1520
- Returns information about whether a document exists in an index.
1520
+ Checks if a document in an index exists.
1521
1521
 
1522
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-get.html>`_
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
1617
+ t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
1618
1618
  ] = None,
1619
1619
  ) -> HeadApiResponse:
1620
1620
  """
1621
- Returns information about whether a document source exists in an index.
1621
+ Checks if a document's `_source` is stored.
1622
1622
 
1623
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-get.html>`_
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["t.Literal['and', 'or']", str]] = None,
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't match) a query.
1721
+ Returns information about why a specific document matches (or doesnt match)
1722
+ a query.
1722
1723
 
1723
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-explain.html>`_
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["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
1822
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
1822
1823
  ],
1823
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
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
- Returns the information about the capabilities of fields among multiple indices.
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.14/search-field-caps.html>`_
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
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.14/docs-get.html>`_
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
- Returns a script.
2049
+ Retrieves a stored script or search template.
2048
2050
 
2049
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/modules-scripting.html>`_
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.14/painless-contexts.html>`_
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.14/modules-scripting.html>`_
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
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.14/docs-get.html>`_
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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.14/health-api.html>`_
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["t.Literal['create', 'index']", str]] = None,
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["t.Literal['false', 'true', 'wait_for']", bool, str]
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
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["t.Literal['all', 'index-setting']", str]]
2335
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
2334
2336
  ] = None,
2335
2337
  ) -> ObjectApiResponse[t.Any]:
2336
2338
  """
2337
- Creates or updates a document in an index.
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.14/docs-index_.html>`_
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.14/index.html>`_
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.14/search-search.html>`_
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.14/docs-multi-get.html>`_
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["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
2706
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
2703
2707
  ],
2704
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
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["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
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.14/search-multi-search.html>`_
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["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
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
- Allows to execute several search template operations in one request.
2860
+ Runs multiple templated searches with a single request.
2847
2861
 
2848
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-multi-search.html>`_
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["t.Literal['external', 'external_gte', 'force', 'internal']", str]
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.14/docs-multi-termvectors.html>`_
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["t.Literal[-1]", "t.Literal[0]", str],
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["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3049
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3036
3050
  ],
3037
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
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
- Open a point in time that can be used in subsequent searches
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.14/point-in-time-api.html>`_
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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.14/modules-scripting.html>`_
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["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3209
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3192
3210
  ],
3193
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
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
- Allows to evaluate the quality of ranked search results over a set of typical
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.14/search-rank-eval.html>`_
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["t.Literal['abort', 'proceed']", str]] = None,
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['auto']", str]]] = None,
3292
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
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["t.Literal['all', 'index-setting']", str]]
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.14/docs-reindex.html>`_
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
- Changes the number of requests per second for a particular Reindex operation.
3416
+ Copies documents from a source to a destination.
3399
3417
 
3400
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-reindex.html>`_
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
- Allows to use the Mustache language to pre-render a search definition.
3467
+ Renders a search template as a search request body.
3450
3468
 
3451
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/render-search-template-api.html>`_
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
- Allows an arbitrary script to be executed and a result to be returned
3535
+ Runs a script and returns a result.
3518
3536
 
3519
- `<https://www.elastic.co/guide/en/elasticsearch/painless/8.14/painless-execute-api.html>`_
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["t.Literal[-1]", "t.Literal[0]", str]] = None,
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.14/search-request-body.html#request-body-search-scroll>`_
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
@@ -3676,16 +3694,16 @@ class AsyncElasticsearch(BaseClient):
3676
3694
  batched_reduce_size: t.Optional[int] = None,
3677
3695
  ccs_minimize_roundtrips: t.Optional[bool] = None,
3678
3696
  collapse: t.Optional[t.Mapping[str, t.Any]] = None,
3679
- default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None,
3697
+ default_operator: t.Optional[t.Union[str, t.Literal["and", "or"]]] = None,
3680
3698
  df: t.Optional[str] = None,
3681
3699
  docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
3682
3700
  error_trace: t.Optional[bool] = None,
3683
3701
  expand_wildcards: t.Optional[
3684
3702
  t.Union[
3685
3703
  t.Sequence[
3686
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
3704
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
3687
3705
  ],
3688
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
3706
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
3689
3707
  ]
3690
3708
  ] = None,
3691
3709
  explain: t.Optional[bool] = None,
@@ -3698,6 +3716,7 @@ class AsyncElasticsearch(BaseClient):
3698
3716
  human: t.Optional[bool] = None,
3699
3717
  ignore_throttled: t.Optional[bool] = None,
3700
3718
  ignore_unavailable: t.Optional[bool] = None,
3719
+ include_named_queries_score: t.Optional[bool] = None,
3701
3720
  indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
3702
3721
  knn: t.Optional[
3703
3722
  t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -3724,12 +3743,12 @@ class AsyncElasticsearch(BaseClient):
3724
3743
  routing: t.Optional[str] = None,
3725
3744
  runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
3726
3745
  script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
3727
- scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
3746
+ scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3728
3747
  search_after: t.Optional[
3729
3748
  t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
3730
3749
  ] = None,
3731
3750
  search_type: t.Optional[
3732
- t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
3751
+ t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
3733
3752
  ] = None,
3734
3753
  seq_no_primary_term: t.Optional[bool] = None,
3735
3754
  size: t.Optional[int] = None,
@@ -3748,7 +3767,7 @@ class AsyncElasticsearch(BaseClient):
3748
3767
  suggest: t.Optional[t.Mapping[str, t.Any]] = None,
3749
3768
  suggest_field: t.Optional[str] = None,
3750
3769
  suggest_mode: t.Optional[
3751
- t.Union["t.Literal['always', 'missing', 'popular']", str]
3770
+ t.Union[str, t.Literal["always", "missing", "popular"]]
3752
3771
  ] = None,
3753
3772
  suggest_size: t.Optional[int] = None,
3754
3773
  suggest_text: t.Optional[str] = None,
@@ -3761,9 +3780,11 @@ class AsyncElasticsearch(BaseClient):
3761
3780
  body: t.Optional[t.Dict[str, t.Any]] = None,
3762
3781
  ) -> ObjectApiResponse[t.Any]:
3763
3782
  """
3764
- Returns results matching a query.
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.
3765
3786
 
3766
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-search.html>`_
3787
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-search.html>`_
3767
3788
 
3768
3789
  :param index: Comma-separated list of data streams, indices, and aliases to search.
3769
3790
  Supports wildcards (`*`). To search all data streams and indices, omit this
@@ -3823,6 +3844,13 @@ class AsyncElasticsearch(BaseClient):
3823
3844
  be ignored when frozen.
3824
3845
  :param ignore_unavailable: If `false`, the request returns an error if it targets
3825
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.
3826
3854
  :param indices_boost: Boosts the _score of documents from specified indices.
3827
3855
  :param knn: Defines the approximate kNN search to run.
3828
3856
  :param lenient: If `true`, format-based query failures (such as providing text
@@ -4004,6 +4032,8 @@ class AsyncElasticsearch(BaseClient):
4004
4032
  __query["ignore_throttled"] = ignore_throttled
4005
4033
  if ignore_unavailable is not None:
4006
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
4007
4037
  if lenient is not None:
4008
4038
  __query["lenient"] = lenient
4009
4039
  if max_concurrent_shard_requests is not None:
@@ -4161,10 +4191,10 @@ class AsyncElasticsearch(BaseClient):
4161
4191
  extent: t.Optional[int] = None,
4162
4192
  fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4163
4193
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4164
- grid_agg: t.Optional[t.Union["t.Literal['geohex', 'geotile']", str]] = None,
4194
+ grid_agg: t.Optional[t.Union[str, t.Literal["geohex", "geotile"]]] = None,
4165
4195
  grid_precision: t.Optional[int] = None,
4166
4196
  grid_type: t.Optional[
4167
- t.Union["t.Literal['centroid', 'grid', 'point']", str]
4197
+ t.Union[str, t.Literal["centroid", "grid", "point"]]
4168
4198
  ] = None,
4169
4199
  human: t.Optional[bool] = None,
4170
4200
  pretty: t.Optional[bool] = None,
@@ -4185,7 +4215,7 @@ class AsyncElasticsearch(BaseClient):
4185
4215
  Searches a vector tile for geospatial values. Returns results as a binary Mapbox
4186
4216
  vector tile.
4187
4217
 
4188
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-vector-tile-api.html>`_
4218
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-vector-tile-api.html>`_
4189
4219
 
4190
4220
  :param index: Comma-separated list of data streams, indices, or aliases to search
4191
4221
  :param field: Field containing geospatial data to return
@@ -4323,9 +4353,9 @@ class AsyncElasticsearch(BaseClient):
4323
4353
  expand_wildcards: t.Optional[
4324
4354
  t.Union[
4325
4355
  t.Sequence[
4326
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
4356
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4327
4357
  ],
4328
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
4358
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4329
4359
  ]
4330
4360
  ] = None,
4331
4361
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -4340,7 +4370,7 @@ class AsyncElasticsearch(BaseClient):
4340
4370
  Returns information about the indices and shards that a search request would
4341
4371
  be executed against.
4342
4372
 
4343
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-shards.html>`_
4373
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-shards.html>`_
4344
4374
 
4345
4375
  :param index: Returns the indices and shards that a search request would be executed
4346
4376
  against.
@@ -4413,9 +4443,9 @@ class AsyncElasticsearch(BaseClient):
4413
4443
  expand_wildcards: t.Optional[
4414
4444
  t.Union[
4415
4445
  t.Sequence[
4416
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
4446
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4417
4447
  ],
4418
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
4448
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4419
4449
  ]
4420
4450
  ] = None,
4421
4451
  explain: t.Optional[bool] = None,
@@ -4430,18 +4460,18 @@ class AsyncElasticsearch(BaseClient):
4430
4460
  profile: t.Optional[bool] = None,
4431
4461
  rest_total_hits_as_int: t.Optional[bool] = None,
4432
4462
  routing: t.Optional[str] = None,
4433
- scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4463
+ scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4434
4464
  search_type: t.Optional[
4435
- t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
4465
+ t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
4436
4466
  ] = None,
4437
4467
  source: t.Optional[str] = None,
4438
4468
  typed_keys: t.Optional[bool] = None,
4439
4469
  body: t.Optional[t.Dict[str, t.Any]] = None,
4440
4470
  ) -> ObjectApiResponse[t.Any]:
4441
4471
  """
4442
- Allows to use the Mustache language to pre-render a search definition.
4472
+ Runs a search with a search template.
4443
4473
 
4444
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-template.html>`_
4474
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-template.html>`_
4445
4475
 
4446
4476
  :param index: Comma-separated list of data streams, indices, and aliases to search.
4447
4477
  Supports wildcards (*).
@@ -4567,7 +4597,7 @@ class AsyncElasticsearch(BaseClient):
4567
4597
  search_after: t.Optional[str] = None,
4568
4598
  size: t.Optional[int] = None,
4569
4599
  string: t.Optional[str] = None,
4570
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4600
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4571
4601
  body: t.Optional[t.Dict[str, t.Any]] = None,
4572
4602
  ) -> ObjectApiResponse[t.Any]:
4573
4603
  """
@@ -4575,7 +4605,7 @@ class AsyncElasticsearch(BaseClient):
4575
4605
  the provided string. It is designed for low-latency look-ups used in auto-complete
4576
4606
  scenarios.
4577
4607
 
4578
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/search-terms-enum.html>`_
4608
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/search-terms-enum.html>`_
4579
4609
 
4580
4610
  :param index: Comma-separated list of data streams, indices, and index aliases
4581
4611
  to search. Wildcard (*) expressions are supported.
@@ -4666,7 +4696,7 @@ class AsyncElasticsearch(BaseClient):
4666
4696
  term_statistics: t.Optional[bool] = None,
4667
4697
  version: t.Optional[int] = None,
4668
4698
  version_type: t.Optional[
4669
- t.Union["t.Literal['external', 'external_gte', 'force', 'internal']", str]
4699
+ t.Union[str, t.Literal["external", "external_gte", "force", "internal"]]
4670
4700
  ] = None,
4671
4701
  body: t.Optional[t.Dict[str, t.Any]] = None,
4672
4702
  ) -> ObjectApiResponse[t.Any]:
@@ -4674,7 +4704,7 @@ class AsyncElasticsearch(BaseClient):
4674
4704
  Returns information and statistics about terms in the fields of a particular
4675
4705
  document.
4676
4706
 
4677
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-termvectors.html>`_
4707
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-termvectors.html>`_
4678
4708
 
4679
4709
  :param index: Name of the index that contains the document.
4680
4710
  :param id: Unique identifier of the document.
@@ -4796,7 +4826,7 @@ class AsyncElasticsearch(BaseClient):
4796
4826
  lang: t.Optional[str] = None,
4797
4827
  pretty: t.Optional[bool] = None,
4798
4828
  refresh: t.Optional[
4799
- t.Union["t.Literal['false', 'true', 'wait_for']", bool, str]
4829
+ t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
4800
4830
  ] = None,
4801
4831
  require_alias: t.Optional[bool] = None,
4802
4832
  retry_on_conflict: t.Optional[int] = None,
@@ -4806,17 +4836,17 @@ class AsyncElasticsearch(BaseClient):
4806
4836
  source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
4807
4837
  source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4808
4838
  source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4809
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4839
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4810
4840
  upsert: t.Optional[t.Mapping[str, t.Any]] = None,
4811
4841
  wait_for_active_shards: t.Optional[
4812
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
4842
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
4813
4843
  ] = None,
4814
4844
  body: t.Optional[t.Dict[str, t.Any]] = None,
4815
4845
  ) -> ObjectApiResponse[t.Any]:
4816
4846
  """
4817
4847
  Updates a document with a script or partial document.
4818
4848
 
4819
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-update.html>`_
4849
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update.html>`_
4820
4850
 
4821
4851
  :param index: The name of the index
4822
4852
  :param id: Document ID
@@ -4929,16 +4959,16 @@ class AsyncElasticsearch(BaseClient):
4929
4959
  allow_no_indices: t.Optional[bool] = None,
4930
4960
  analyze_wildcard: t.Optional[bool] = None,
4931
4961
  analyzer: t.Optional[str] = None,
4932
- conflicts: t.Optional[t.Union["t.Literal['abort', 'proceed']", str]] = None,
4933
- default_operator: t.Optional[t.Union["t.Literal['and', 'or']", str]] = None,
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,
4934
4964
  df: t.Optional[str] = None,
4935
4965
  error_trace: t.Optional[bool] = None,
4936
4966
  expand_wildcards: t.Optional[
4937
4967
  t.Union[
4938
4968
  t.Sequence[
4939
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str]
4969
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
4940
4970
  ],
4941
- t.Union["t.Literal['all', 'closed', 'hidden', 'none', 'open']", str],
4971
+ t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
4942
4972
  ]
4943
4973
  ] = None,
4944
4974
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
@@ -4950,40 +4980,39 @@ class AsyncElasticsearch(BaseClient):
4950
4980
  pipeline: t.Optional[str] = None,
4951
4981
  preference: t.Optional[str] = None,
4952
4982
  pretty: t.Optional[bool] = None,
4983
+ q: t.Optional[str] = None,
4953
4984
  query: t.Optional[t.Mapping[str, t.Any]] = None,
4954
4985
  refresh: t.Optional[bool] = None,
4955
4986
  request_cache: t.Optional[bool] = None,
4956
4987
  requests_per_second: t.Optional[float] = None,
4957
4988
  routing: t.Optional[str] = None,
4958
4989
  script: t.Optional[t.Mapping[str, t.Any]] = None,
4959
- scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4990
+ scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4960
4991
  scroll_size: t.Optional[int] = None,
4961
- search_timeout: t.Optional[
4962
- t.Union["t.Literal[-1]", "t.Literal[0]", str]
4963
- ] = None,
4992
+ search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4964
4993
  search_type: t.Optional[
4965
- t.Union["t.Literal['dfs_query_then_fetch', 'query_then_fetch']", str]
4994
+ t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
4966
4995
  ] = None,
4967
4996
  slice: t.Optional[t.Mapping[str, t.Any]] = None,
4968
- slices: t.Optional[t.Union[int, t.Union["t.Literal['auto']", str]]] = None,
4997
+ slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
4969
4998
  sort: t.Optional[t.Sequence[str]] = None,
4970
4999
  stats: t.Optional[t.Sequence[str]] = None,
4971
5000
  terminate_after: t.Optional[int] = None,
4972
- timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
5001
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4973
5002
  version: t.Optional[bool] = None,
4974
5003
  version_type: t.Optional[bool] = None,
4975
5004
  wait_for_active_shards: t.Optional[
4976
- t.Union[int, t.Union["t.Literal['all', 'index-setting']", str]]
5005
+ t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
4977
5006
  ] = None,
4978
5007
  wait_for_completion: t.Optional[bool] = None,
4979
5008
  body: t.Optional[t.Dict[str, t.Any]] = None,
4980
5009
  ) -> ObjectApiResponse[t.Any]:
4981
5010
  """
4982
5011
  Updates documents that match the specified query. If no query is specified, performs
4983
- an update on every document in the index without changing the source, for example
4984
- to pick up a mapping change.
5012
+ an update on every document in the data stream or index without modifying the
5013
+ source, which is useful for picking up mapping changes.
4985
5014
 
4986
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-update-by-query.html>`_
5015
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update-by-query.html>`_
4987
5016
 
4988
5017
  :param index: Comma-separated list of data streams, indices, and aliases to search.
4989
5018
  Supports wildcards (`*`). To search all data streams or indices, omit this
@@ -5018,6 +5047,7 @@ class AsyncElasticsearch(BaseClient):
5018
5047
  parameter.
5019
5048
  :param preference: Specifies the node or shard the operation should be performed
5020
5049
  on. Random by default.
5050
+ :param q: Query in the Lucene query string syntax.
5021
5051
  :param query: Specifies the documents to update using the Query DSL.
5022
5052
  :param refresh: If `true`, Elasticsearch refreshes affected shards to make the
5023
5053
  operation visible to search.
@@ -5102,6 +5132,8 @@ class AsyncElasticsearch(BaseClient):
5102
5132
  __query["preference"] = preference
5103
5133
  if pretty is not None:
5104
5134
  __query["pretty"] = pretty
5135
+ if q is not None:
5136
+ __query["q"] = q
5105
5137
  if refresh is not None:
5106
5138
  __query["refresh"] = refresh
5107
5139
  if request_cache is not None:
@@ -5176,7 +5208,7 @@ class AsyncElasticsearch(BaseClient):
5176
5208
  """
5177
5209
  Changes the number of requests per second for a particular Update By Query operation.
5178
5210
 
5179
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.14/docs-update-by-query.html>`_
5211
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-update-by-query.html>`_
5180
5212
 
5181
5213
  :param task_id: The ID for the task.
5182
5214
  :param requests_per_second: The throttle for this request in sub-requests per