elasticsearch 9.2.0__py3-none-any.whl → 9.3.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.
Files changed (125) hide show
  1. elasticsearch/_async/client/__init__.py +108 -85
  2. elasticsearch/_async/client/async_search.py +7 -6
  3. elasticsearch/_async/client/autoscaling.py +15 -4
  4. elasticsearch/_async/client/cat.py +203 -10
  5. elasticsearch/_async/client/ccr.py +10 -10
  6. elasticsearch/_async/client/cluster.py +98 -66
  7. elasticsearch/_async/client/connector.py +42 -41
  8. elasticsearch/_async/client/dangling_indices.py +8 -12
  9. elasticsearch/_async/client/enrich.py +10 -10
  10. elasticsearch/_async/client/eql.py +17 -16
  11. elasticsearch/_async/client/esql.py +173 -24
  12. elasticsearch/_async/client/features.py +6 -6
  13. elasticsearch/_async/client/fleet.py +8 -8
  14. elasticsearch/_async/client/graph.py +3 -3
  15. elasticsearch/_async/client/ilm.py +18 -18
  16. elasticsearch/_async/client/indices.py +564 -149
  17. elasticsearch/_async/client/inference.py +374 -64
  18. elasticsearch/_async/client/ingest.py +9 -9
  19. elasticsearch/_async/client/license.py +5 -7
  20. elasticsearch/_async/client/logstash.py +4 -4
  21. elasticsearch/_async/client/migration.py +6 -6
  22. elasticsearch/_async/client/ml.py +132 -88
  23. elasticsearch/_async/client/monitoring.py +4 -3
  24. elasticsearch/_async/client/nodes.py +182 -20
  25. elasticsearch/_async/client/project.py +13 -4
  26. elasticsearch/_async/client/query_rules.py +16 -16
  27. elasticsearch/_async/client/rollup.py +21 -21
  28. elasticsearch/_async/client/search_application.py +19 -19
  29. elasticsearch/_async/client/searchable_snapshots.py +10 -10
  30. elasticsearch/_async/client/security.py +34 -10
  31. elasticsearch/_async/client/shutdown.py +15 -4
  32. elasticsearch/_async/client/simulate.py +4 -4
  33. elasticsearch/_async/client/slm.py +17 -17
  34. elasticsearch/_async/client/snapshot.py +21 -21
  35. elasticsearch/_async/client/sql.py +17 -16
  36. elasticsearch/_async/client/streams.py +6 -7
  37. elasticsearch/_async/client/synonyms.py +10 -10
  38. elasticsearch/_async/client/tasks.py +8 -8
  39. elasticsearch/_async/client/text_structure.py +16 -12
  40. elasticsearch/_async/client/transform.py +51 -12
  41. elasticsearch/_async/client/utils.py +4 -2
  42. elasticsearch/_async/client/watcher.py +26 -26
  43. elasticsearch/_async/client/xpack.py +6 -5
  44. elasticsearch/_sync/client/__init__.py +110 -85
  45. elasticsearch/_sync/client/async_search.py +7 -6
  46. elasticsearch/_sync/client/autoscaling.py +15 -4
  47. elasticsearch/_sync/client/cat.py +203 -10
  48. elasticsearch/_sync/client/ccr.py +10 -10
  49. elasticsearch/_sync/client/cluster.py +98 -66
  50. elasticsearch/_sync/client/connector.py +42 -41
  51. elasticsearch/_sync/client/dangling_indices.py +8 -12
  52. elasticsearch/_sync/client/enrich.py +10 -10
  53. elasticsearch/_sync/client/eql.py +17 -16
  54. elasticsearch/_sync/client/esql.py +173 -24
  55. elasticsearch/_sync/client/features.py +6 -6
  56. elasticsearch/_sync/client/fleet.py +8 -8
  57. elasticsearch/_sync/client/graph.py +3 -3
  58. elasticsearch/_sync/client/ilm.py +18 -18
  59. elasticsearch/_sync/client/indices.py +564 -149
  60. elasticsearch/_sync/client/inference.py +374 -64
  61. elasticsearch/_sync/client/ingest.py +9 -9
  62. elasticsearch/_sync/client/license.py +5 -7
  63. elasticsearch/_sync/client/logstash.py +4 -4
  64. elasticsearch/_sync/client/migration.py +6 -6
  65. elasticsearch/_sync/client/ml.py +132 -88
  66. elasticsearch/_sync/client/monitoring.py +4 -3
  67. elasticsearch/_sync/client/nodes.py +182 -20
  68. elasticsearch/_sync/client/project.py +13 -4
  69. elasticsearch/_sync/client/project_routing.py +264 -0
  70. elasticsearch/_sync/client/query_rules.py +16 -16
  71. elasticsearch/_sync/client/rollup.py +21 -21
  72. elasticsearch/_sync/client/search_application.py +19 -19
  73. elasticsearch/_sync/client/searchable_snapshots.py +10 -10
  74. elasticsearch/_sync/client/security.py +34 -10
  75. elasticsearch/_sync/client/shutdown.py +15 -4
  76. elasticsearch/_sync/client/simulate.py +4 -4
  77. elasticsearch/_sync/client/slm.py +17 -17
  78. elasticsearch/_sync/client/snapshot.py +21 -21
  79. elasticsearch/_sync/client/sql.py +17 -16
  80. elasticsearch/_sync/client/streams.py +6 -7
  81. elasticsearch/_sync/client/synonyms.py +10 -10
  82. elasticsearch/_sync/client/tasks.py +8 -8
  83. elasticsearch/_sync/client/text_structure.py +16 -12
  84. elasticsearch/_sync/client/transform.py +51 -12
  85. elasticsearch/_sync/client/utils.py +16 -2
  86. elasticsearch/_sync/client/watcher.py +26 -26
  87. elasticsearch/_sync/client/xpack.py +6 -5
  88. elasticsearch/_version.py +2 -2
  89. elasticsearch/dsl/__init__.py +4 -0
  90. elasticsearch/dsl/_async/document.py +4 -5
  91. elasticsearch/dsl/_async/index.py +1 -1
  92. elasticsearch/dsl/_async/search.py +2 -3
  93. elasticsearch/dsl/_sync/document.py +4 -5
  94. elasticsearch/dsl/_sync/index.py +1 -1
  95. elasticsearch/dsl/_sync/search.py +2 -3
  96. elasticsearch/dsl/aggs.py +9 -9
  97. elasticsearch/dsl/async_connections.py +1 -2
  98. elasticsearch/dsl/connections.py +1 -2
  99. elasticsearch/dsl/document_base.py +1 -1
  100. elasticsearch/dsl/field.py +90 -6
  101. elasticsearch/dsl/pydantic.py +1 -1
  102. elasticsearch/dsl/query.py +25 -2
  103. elasticsearch/dsl/response/__init__.py +2 -0
  104. elasticsearch/dsl/serializer.py +1 -2
  105. elasticsearch/dsl/types.py +63 -8
  106. elasticsearch/dsl/utils.py +12 -4
  107. elasticsearch/esql/esql.py +1 -1
  108. elasticsearch/esql/functions.py +926 -252
  109. elasticsearch/helpers/__init__.py +2 -0
  110. elasticsearch/helpers/actions.py +21 -0
  111. elasticsearch/helpers/vectorstore/__init__.py +7 -7
  112. elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
  113. elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
  114. elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
  115. elasticsearch/helpers/vectorstore/_async/vectorstore.py +8 -5
  116. elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
  117. elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
  118. elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
  119. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +8 -5
  120. {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/METADATA +2 -1
  121. elasticsearch-9.3.0.dist-info/RECORD +169 -0
  122. {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/WHEEL +1 -1
  123. elasticsearch-9.2.0.dist-info/RECORD +0 -168
  124. {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/licenses/LICENSE +0 -0
  125. {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/licenses/NOTICE +0 -0
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
23
23
  from .utils import (
24
24
  SKIP_IN_PATH,
25
25
  Stability,
26
+ _availability_warning,
26
27
  _quote,
27
28
  _rewrite_parameters,
28
- _stability_warning,
29
29
  )
30
30
 
31
31
 
@@ -35,7 +35,7 @@ class IndicesClient(NamespacedClient):
35
35
  def add_block(
36
36
  self,
37
37
  *,
38
- index: str,
38
+ index: t.Union[str, t.Sequence[str]],
39
39
  block: t.Union[str, t.Literal["metadata", "read", "read_only", "write"]],
40
40
  allow_no_indices: t.Optional[bool] = None,
41
41
  error_trace: t.Optional[bool] = None,
@@ -165,8 +165,8 @@ class IndicesClient(NamespacedClient):
165
165
  """
166
166
  .. raw:: html
167
167
 
168
- <p>Get tokens from text analysis.
169
- The analyze API performs analysis on a text string and returns the resulting tokens.</p>
168
+ <p>Get tokens from text analysis.</p>
169
+ <p>The analyze API performs analysis on a text string and returns the resulting tokens.</p>
170
170
  <p>Generating excessive amount of tokens may cause a node to run out of memory.
171
171
  The <code>index.analyze.max_token_count</code> setting enables you to limit the number of tokens that can be produced.
172
172
  If more than this limit of tokens gets generated, an error occurs.
@@ -244,7 +244,6 @@ class IndicesClient(NamespacedClient):
244
244
  )
245
245
 
246
246
  @_rewrite_parameters()
247
- @_stability_warning(Stability.EXPERIMENTAL)
248
247
  def cancel_migrate_reindex(
249
248
  self,
250
249
  *,
@@ -315,8 +314,8 @@ class IndicesClient(NamespacedClient):
315
314
  """
316
315
  .. raw:: html
317
316
 
318
- <p>Clear the cache.
319
- Clear the cache of one or more indices.
317
+ <p>Clear the cache.</p>
318
+ <p>Clear the cache of one or more indices.
320
319
  For data streams, the API clears the caches of the stream's backing indices.</p>
321
320
  <p>By default, the clear cache API clears all caches.
322
321
  To clear only specific caches, use the <code>fielddata</code>, <code>query</code>, or <code>request</code> parameters.
@@ -408,8 +407,8 @@ class IndicesClient(NamespacedClient):
408
407
  """
409
408
  .. raw:: html
410
409
 
411
- <p>Clone an index.
412
- Clone an existing index into a new index.
410
+ <p>Clone an index.</p>
411
+ <p>Clone an existing index into a new index.
413
412
  Each original primary shard is cloned into a new primary shard in the new index.</p>
414
413
  <p>IMPORTANT: Elasticsearch does not apply index templates to the resulting index.
415
414
  The API also does not copy index metadata from the original index.
@@ -533,8 +532,8 @@ class IndicesClient(NamespacedClient):
533
532
  """
534
533
  .. raw:: html
535
534
 
536
- <p>Close an index.
537
- A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.
535
+ <p>Close an index.</p>
536
+ <p>A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.
538
537
  It is not possible to index documents or to search for documents in a closed index.
539
538
  Closed indices do not have to maintain internal data structures for indexing or searching documents, which results in a smaller overhead on the cluster.</p>
540
539
  <p>When opening or closing an index, the master node is responsible for restarting the index shards to reflect the new state of the index.
@@ -630,8 +629,8 @@ class IndicesClient(NamespacedClient):
630
629
  """
631
630
  .. raw:: html
632
631
 
633
- <p>Create an index.
634
- You can use the create index API to add a new index to an Elasticsearch cluster.
632
+ <p>Create an index.</p>
633
+ <p>You can use the create index API to add a new index to an Elasticsearch cluster.
635
634
  When creating an index, you can specify the following:</p>
636
635
  <ul>
637
636
  <li>Settings for the index.</li>
@@ -778,7 +777,6 @@ class IndicesClient(NamespacedClient):
778
777
  @_rewrite_parameters(
779
778
  body_name="create_from",
780
779
  )
781
- @_stability_warning(Stability.EXPERIMENTAL)
782
780
  def create_from(
783
781
  self,
784
782
  *,
@@ -844,7 +842,7 @@ class IndicesClient(NamespacedClient):
844
842
  def data_streams_stats(
845
843
  self,
846
844
  *,
847
- name: t.Optional[str] = None,
845
+ name: t.Optional[t.Union[str, t.Sequence[str]]] = None,
848
846
  error_trace: t.Optional[bool] = None,
849
847
  expand_wildcards: t.Optional[
850
848
  t.Union[
@@ -926,8 +924,8 @@ class IndicesClient(NamespacedClient):
926
924
  """
927
925
  .. raw:: html
928
926
 
929
- <p>Delete indices.
930
- Deleting an index deletes its documents, shards, and metadata.
927
+ <p>Delete indices.</p>
928
+ <p>Deleting an index deletes its documents, shards, and metadata.
931
929
  It does not delete related Kibana components, such as data views, visualizations, or dashboards.</p>
932
930
  <p>You cannot delete the current write index of a data stream.
933
931
  To delete the index, you must roll over the data stream so a new write index is created.
@@ -1004,8 +1002,8 @@ class IndicesClient(NamespacedClient):
1004
1002
  """
1005
1003
  .. raw:: html
1006
1004
 
1007
- <p>Delete an alias.
1008
- Removes a data stream or index from an alias.</p>
1005
+ <p>Delete an alias.</p>
1006
+ <p>Removes a data stream or index from an alias.</p>
1009
1007
 
1010
1008
 
1011
1009
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias>`_
@@ -1072,18 +1070,18 @@ class IndicesClient(NamespacedClient):
1072
1070
  """
1073
1071
  .. raw:: html
1074
1072
 
1075
- <p>Delete data stream lifecycles.
1076
- Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
1073
+ <p>Delete data stream lifecycles.</p>
1074
+ <p>Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
1077
1075
 
1078
1076
 
1079
1077
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle>`_
1080
1078
 
1081
1079
  :param name: A comma-separated list of data streams of which the data stream
1082
- lifecycle will be deleted; use `*` to get all data streams
1080
+ lifecycle will be deleted. Use `*` to get all data streams
1083
1081
  :param expand_wildcards: Whether wildcard expressions should get expanded to
1084
1082
  open or closed indices (default: open)
1085
- :param master_timeout: Specify timeout for connection to master
1086
- :param timeout: Explicit timestamp for the document
1083
+ :param master_timeout: The period to wait for a connection to the master node.
1084
+ :param timeout: The period to wait for a response.
1087
1085
  """
1088
1086
  if name in SKIP_IN_PATH:
1089
1087
  raise ValueError("Empty value passed for parameter 'name'")
@@ -1136,8 +1134,8 @@ class IndicesClient(NamespacedClient):
1136
1134
  """
1137
1135
  .. raw:: html
1138
1136
 
1139
- <p>Delete data streams.
1140
- Deletes one or more data streams and their backing indices.</p>
1137
+ <p>Delete data streams.</p>
1138
+ <p>Deletes one or more data streams and their backing indices.</p>
1141
1139
 
1142
1140
 
1143
1141
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream>`_
@@ -1200,18 +1198,18 @@ class IndicesClient(NamespacedClient):
1200
1198
  """
1201
1199
  .. raw:: html
1202
1200
 
1203
- <p>Delete data stream options.
1204
- Removes the data stream options from a data stream.</p>
1201
+ <p>Delete data stream options.</p>
1202
+ <p>Removes the data stream options from a data stream.</p>
1205
1203
 
1206
1204
 
1207
1205
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options>`_
1208
1206
 
1209
1207
  :param name: A comma-separated list of data streams of which the data stream
1210
- options will be deleted; use `*` to get all data streams
1208
+ options will be deleted. Use `*` to get all data streams
1211
1209
  :param expand_wildcards: Whether wildcard expressions should get expanded to
1212
- open or closed indices (default: open)
1213
- :param master_timeout: Specify timeout for connection to master
1214
- :param timeout: Explicit timestamp for the document
1210
+ open or closed indices
1211
+ :param master_timeout: The period to wait for a connection to the master node.
1212
+ :param timeout: The period to wait for a response.
1215
1213
  """
1216
1214
  if name in SKIP_IN_PATH:
1217
1215
  raise ValueError("Empty value passed for parameter 'name'")
@@ -1257,8 +1255,8 @@ class IndicesClient(NamespacedClient):
1257
1255
  """
1258
1256
  .. raw:: html
1259
1257
 
1260
- <p>Delete an index template.
1261
- The provided <!-- raw HTML omitted --> may contain multiple template names separated by a comma. If multiple template
1258
+ <p>Delete an index template.</p>
1259
+ <p>The provided <!-- raw HTML omitted --> may contain multiple template names separated by a comma. If multiple template
1262
1260
  names are specified then there is no wildcard support and the provided names should match completely with
1263
1261
  existing templates.</p>
1264
1262
 
@@ -1300,6 +1298,62 @@ class IndicesClient(NamespacedClient):
1300
1298
  path_parts=__path_parts,
1301
1299
  )
1302
1300
 
1301
+ @_rewrite_parameters()
1302
+ @_availability_warning(Stability.EXPERIMENTAL)
1303
+ def delete_sample_configuration(
1304
+ self,
1305
+ *,
1306
+ index: str,
1307
+ error_trace: t.Optional[bool] = None,
1308
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
1309
+ human: t.Optional[bool] = None,
1310
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1311
+ pretty: t.Optional[bool] = None,
1312
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1313
+ ) -> ObjectApiResponse[t.Any]:
1314
+ """
1315
+ .. raw:: html
1316
+
1317
+ <p>Delete sampling configuration.</p>
1318
+ <p>Delete the sampling configuration for the specified index.</p>
1319
+
1320
+
1321
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
1322
+
1323
+ :param index: The name of the index.
1324
+ :param master_timeout: Period to wait for a connection to the master node. If
1325
+ no response is received before the timeout expires, the request fails and
1326
+ returns an error.
1327
+ :param timeout: Period to wait for a response. If no response is received before
1328
+ the timeout expires, the request fails and returns an error.
1329
+ """
1330
+ if index in SKIP_IN_PATH:
1331
+ raise ValueError("Empty value passed for parameter 'index'")
1332
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
1333
+ __path = f'/{__path_parts["index"]}/_sample/config'
1334
+ __query: t.Dict[str, t.Any] = {}
1335
+ if error_trace is not None:
1336
+ __query["error_trace"] = error_trace
1337
+ if filter_path is not None:
1338
+ __query["filter_path"] = filter_path
1339
+ if human is not None:
1340
+ __query["human"] = human
1341
+ if master_timeout is not None:
1342
+ __query["master_timeout"] = master_timeout
1343
+ if pretty is not None:
1344
+ __query["pretty"] = pretty
1345
+ if timeout is not None:
1346
+ __query["timeout"] = timeout
1347
+ __headers = {"accept": "application/json"}
1348
+ return self.perform_request( # type: ignore[return-value]
1349
+ "DELETE",
1350
+ __path,
1351
+ params=__query,
1352
+ headers=__headers,
1353
+ endpoint_id="indices.delete_sample_configuration",
1354
+ path_parts=__path_parts,
1355
+ )
1356
+
1303
1357
  @_rewrite_parameters()
1304
1358
  def delete_template(
1305
1359
  self,
@@ -1315,8 +1369,8 @@ class IndicesClient(NamespacedClient):
1315
1369
  """
1316
1370
  .. raw:: html
1317
1371
 
1318
- <p>Delete a legacy index template.
1319
- IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
1372
+ <p>Delete a legacy index template.</p>
1373
+ <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
1320
1374
 
1321
1375
 
1322
1376
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template>`_
@@ -1357,7 +1411,7 @@ class IndicesClient(NamespacedClient):
1357
1411
  )
1358
1412
 
1359
1413
  @_rewrite_parameters()
1360
- @_stability_warning(Stability.EXPERIMENTAL)
1414
+ @_availability_warning(Stability.EXPERIMENTAL)
1361
1415
  def disk_usage(
1362
1416
  self,
1363
1417
  *,
@@ -1382,8 +1436,8 @@ class IndicesClient(NamespacedClient):
1382
1436
  """
1383
1437
  .. raw:: html
1384
1438
 
1385
- <p>Analyze the index disk usage.
1386
- Analyze the disk usage of each field of an index or data stream.
1439
+ <p>Analyze the index disk usage.</p>
1440
+ <p>Analyze the disk usage of each field of an index or data stream.
1387
1441
  This API might not support indices created in previous Elasticsearch versions.
1388
1442
  The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.</p>
1389
1443
  <p>NOTE: The total size of fields of the analyzed shards of the index in the response is usually smaller than the index <code>store_size</code> value because some small metadata files are ignored and some parts of data files might not be scanned by the API.
@@ -1450,7 +1504,7 @@ class IndicesClient(NamespacedClient):
1450
1504
  @_rewrite_parameters(
1451
1505
  body_name="config",
1452
1506
  )
1453
- @_stability_warning(Stability.EXPERIMENTAL)
1507
+ @_availability_warning(Stability.EXPERIMENTAL)
1454
1508
  def downsample(
1455
1509
  self,
1456
1510
  *,
@@ -1466,13 +1520,18 @@ class IndicesClient(NamespacedClient):
1466
1520
  """
1467
1521
  .. raw:: html
1468
1522
 
1469
- <p>Downsample an index.
1470
- Aggregate a time series (TSDS) index and store pre-computed statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>) for each metric field grouped by a configured time interval.
1471
- For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
1523
+ <p>Downsample an index.</p>
1524
+ <p>Downsamples a time series (TSDS) index and reduces its size by keeping the last value or by pre-aggregating metrics:</p>
1525
+ <ul>
1526
+ <li>When running in <code>aggregate</code> mode, it pre-calculates and stores statistical summaries (<code>min</code>, <code>max</code>, <code>sum</code>, <code>value_count</code> and <code>avg</code>)
1527
+ for each metric field grouped by a configured time interval and their dimensions.</li>
1528
+ <li>When running in <code>last_value</code> mode, it keeps the last value for each metric in the configured interval and their dimensions.</li>
1529
+ </ul>
1530
+ <p>For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
1472
1531
  All documents within an hour interval are summarized and stored as a single document in the downsample index.</p>
1473
1532
  <p>NOTE: Only indices in a time series data stream are supported.
1474
1533
  Neither field nor document level security can be defined on the source index.
1475
- The source index must be read only (<code>index.blocks.write: true</code>).</p>
1534
+ The source index must be read-only (<code>index.blocks.write: true</code>).</p>
1476
1535
 
1477
1536
 
1478
1537
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-downsample>`_
@@ -1543,8 +1602,8 @@ class IndicesClient(NamespacedClient):
1543
1602
  """
1544
1603
  .. raw:: html
1545
1604
 
1546
- <p>Check indices.
1547
- Check if one or more indices, index aliases, or data streams exist.</p>
1605
+ <p>Check indices.</p>
1606
+ <p>Check if one or more indices, index aliases, or data streams exist.</p>
1548
1607
 
1549
1608
 
1550
1609
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists>`_
@@ -1763,8 +1822,8 @@ class IndicesClient(NamespacedClient):
1763
1822
  """
1764
1823
  .. raw:: html
1765
1824
 
1766
- <p>Check existence of index templates.
1767
- Get information about whether index templates exist.
1825
+ <p>Check existence of index templates.</p>
1826
+ <p>Get information about whether index templates exist.
1768
1827
  Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
1769
1828
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
1770
1829
 
@@ -1823,16 +1882,16 @@ class IndicesClient(NamespacedClient):
1823
1882
  """
1824
1883
  .. raw:: html
1825
1884
 
1826
- <p>Get the status for a data stream lifecycle.
1827
- Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.</p>
1885
+ <p>Get the status for a data stream lifecycle.</p>
1886
+ <p>Get information about an index or data stream's current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.</p>
1828
1887
 
1829
1888
 
1830
1889
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle>`_
1831
1890
 
1832
- :param index: The name of the index to explain
1833
- :param include_defaults: indicates if the API should return the default values
1891
+ :param index: Comma-separated list of index names to explain
1892
+ :param include_defaults: Indicates if the API should return the default values
1834
1893
  the system uses for the index's lifecycle
1835
- :param master_timeout: Specify timeout for connection to master
1894
+ :param master_timeout: The period to wait for a connection to the master node.
1836
1895
  """
1837
1896
  if index in SKIP_IN_PATH:
1838
1897
  raise ValueError("Empty value passed for parameter 'index'")
@@ -1862,7 +1921,7 @@ class IndicesClient(NamespacedClient):
1862
1921
  )
1863
1922
 
1864
1923
  @_rewrite_parameters()
1865
- @_stability_warning(Stability.EXPERIMENTAL)
1924
+ @_availability_warning(Stability.EXPERIMENTAL)
1866
1925
  def field_usage_stats(
1867
1926
  self,
1868
1927
  *,
@@ -1886,8 +1945,8 @@ class IndicesClient(NamespacedClient):
1886
1945
  """
1887
1946
  .. raw:: html
1888
1947
 
1889
- <p>Get field usage stats.
1890
- Get field usage information for each shard and field of an index.
1948
+ <p>Get field usage stats.</p>
1949
+ <p>Get field usage information for each shard and field of an index.
1891
1950
  Field usage statistics are automatically captured when queries are running on a cluster.
1892
1951
  A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.</p>
1893
1952
  <p>The response body reports the per-shard usage count of the data structures that back the fields in the index.
@@ -1968,8 +2027,8 @@ class IndicesClient(NamespacedClient):
1968
2027
  """
1969
2028
  .. raw:: html
1970
2029
 
1971
- <p>Flush data streams or indices.
1972
- Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.
2030
+ <p>Flush data streams or indices.</p>
2031
+ <p>Flushing a data stream or index is the process of making sure that any data that is currently only stored in the transaction log is also permanently stored in the Lucene index.
1973
2032
  When restarting, Elasticsearch replays any unflushed operations from the transaction log into the Lucene index to bring it back into the state that it was in before the restart.
1974
2033
  Elasticsearch automatically triggers flushes as needed, using heuristics that trade off the size of the unflushed transaction log against the cost of performing each flush.</p>
1975
2034
  <p>After each operation has been flushed it is permanently stored in the Lucene index.
@@ -2062,8 +2121,8 @@ class IndicesClient(NamespacedClient):
2062
2121
  """
2063
2122
  .. raw:: html
2064
2123
 
2065
- <p>Force a merge.
2066
- Perform the force merge operation on the shards of one or more indices.
2124
+ <p>Force a merge.</p>
2125
+ <p>Perform the force merge operation on the shards of one or more indices.
2067
2126
  For data streams, the API forces a merge on the shards of the stream's backing indices.</p>
2068
2127
  <p>Merging reduces the number of segments in each shard by merging some of them together and also frees up the space used by deleted documents.
2069
2128
  Merging normally happens automatically, but sometimes it is useful to trigger a merge manually.</p>
@@ -2114,7 +2173,7 @@ class IndicesClient(NamespacedClient):
2114
2173
  :param expand_wildcards: Whether to expand wildcard expression to concrete indices
2115
2174
  that are open, closed or both.
2116
2175
  :param flush: Specify whether the index should be flushed after performing the
2117
- operation (default: true)
2176
+ operation
2118
2177
  :param ignore_unavailable: Whether specified concrete indices should be ignored
2119
2178
  when unavailable (missing or closed)
2120
2179
  :param max_num_segments: The number of segments the index should be merged into
@@ -2122,7 +2181,7 @@ class IndicesClient(NamespacedClient):
2122
2181
  :param only_expunge_deletes: Specify whether the operation should only expunge
2123
2182
  deleted documents
2124
2183
  :param wait_for_completion: Should the request wait until the force merge is
2125
- completed.
2184
+ completed
2126
2185
  """
2127
2186
  __path_parts: t.Dict[str, str]
2128
2187
  if index not in SKIP_IN_PATH:
@@ -2197,8 +2256,8 @@ class IndicesClient(NamespacedClient):
2197
2256
  """
2198
2257
  .. raw:: html
2199
2258
 
2200
- <p>Get index information.
2201
- Get information about one or more indices. For data streams, the API returns information about the
2259
+ <p>Get index information.</p>
2260
+ <p>Get information about one or more indices. For data streams, the API returns information about the
2202
2261
  stream’s backing indices.</p>
2203
2262
 
2204
2263
 
@@ -2291,8 +2350,8 @@ class IndicesClient(NamespacedClient):
2291
2350
  """
2292
2351
  .. raw:: html
2293
2352
 
2294
- <p>Get aliases.
2295
- Retrieves information for one or more data stream or index aliases.</p>
2353
+ <p>Get aliases.</p>
2354
+ <p>Retrieves information for one or more data stream or index aliases.</p>
2296
2355
 
2297
2356
 
2298
2357
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias>`_
@@ -2355,6 +2414,53 @@ class IndicesClient(NamespacedClient):
2355
2414
  path_parts=__path_parts,
2356
2415
  )
2357
2416
 
2417
+ @_rewrite_parameters()
2418
+ @_availability_warning(Stability.EXPERIMENTAL)
2419
+ def get_all_sample_configuration(
2420
+ self,
2421
+ *,
2422
+ error_trace: t.Optional[bool] = None,
2423
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2424
+ human: t.Optional[bool] = None,
2425
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2426
+ pretty: t.Optional[bool] = None,
2427
+ ) -> ObjectApiResponse[t.Any]:
2428
+ """
2429
+ .. raw:: html
2430
+
2431
+ <p>Get all sampling configurations.</p>
2432
+ <p>Get the sampling configurations for all indices.</p>
2433
+
2434
+
2435
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
2436
+
2437
+ :param master_timeout: Period to wait for a connection to the master node. If
2438
+ no response is received before the timeout expires, the request fails and
2439
+ returns an error.
2440
+ """
2441
+ __path_parts: t.Dict[str, str] = {}
2442
+ __path = "/_sample/config"
2443
+ __query: t.Dict[str, t.Any] = {}
2444
+ if error_trace is not None:
2445
+ __query["error_trace"] = error_trace
2446
+ if filter_path is not None:
2447
+ __query["filter_path"] = filter_path
2448
+ if human is not None:
2449
+ __query["human"] = human
2450
+ if master_timeout is not None:
2451
+ __query["master_timeout"] = master_timeout
2452
+ if pretty is not None:
2453
+ __query["pretty"] = pretty
2454
+ __headers = {"accept": "application/json"}
2455
+ return self.perform_request( # type: ignore[return-value]
2456
+ "GET",
2457
+ __path,
2458
+ params=__query,
2459
+ headers=__headers,
2460
+ endpoint_id="indices.get_all_sample_configuration",
2461
+ path_parts=__path_parts,
2462
+ )
2463
+
2358
2464
  @_rewrite_parameters()
2359
2465
  def get_data_lifecycle(
2360
2466
  self,
@@ -2435,8 +2541,8 @@ class IndicesClient(NamespacedClient):
2435
2541
  """
2436
2542
  .. raw:: html
2437
2543
 
2438
- <p>Get data stream lifecycle stats.
2439
- Get statistics about the data streams that are managed by a data stream lifecycle.</p>
2544
+ <p>Get data stream lifecycle stats.</p>
2545
+ <p>Get statistics about the data streams that are managed by a data stream lifecycle.</p>
2440
2546
 
2441
2547
 
2442
2548
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats>`_
@@ -2730,8 +2836,8 @@ class IndicesClient(NamespacedClient):
2730
2836
  """
2731
2837
  .. raw:: html
2732
2838
 
2733
- <p>Get mapping definitions.
2734
- Retrieves mapping definitions for one or more fields.
2839
+ <p>Get mapping definitions.</p>
2840
+ <p>Retrieves mapping definitions for one or more fields.
2735
2841
  For data streams, the API retrieves field mappings for the stream’s backing indices.</p>
2736
2842
  <p>This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.</p>
2737
2843
 
@@ -2809,14 +2915,14 @@ class IndicesClient(NamespacedClient):
2809
2915
  """
2810
2916
  .. raw:: html
2811
2917
 
2812
- <p>Get index templates.
2813
- Get information about one or more index templates.</p>
2918
+ <p>Get index templates.</p>
2919
+ <p>Get information about one or more index templates.</p>
2814
2920
 
2815
2921
 
2816
2922
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template>`_
2817
2923
 
2818
- :param name: Comma-separated list of index template names used to limit the request.
2819
- Wildcard (*) expressions are supported.
2924
+ :param name: Name of index template to retrieve. Wildcard (*) expressions are
2925
+ supported.
2820
2926
  :param flat_settings: If true, returns settings in flat format.
2821
2927
  :param include_defaults: If true, returns all relevant default configurations
2822
2928
  for the index template.
@@ -2886,8 +2992,8 @@ class IndicesClient(NamespacedClient):
2886
2992
  """
2887
2993
  .. raw:: html
2888
2994
 
2889
- <p>Get mapping definitions.
2890
- For data streams, the API retrieves mappings for the stream’s backing indices.</p>
2995
+ <p>Get mapping definitions.</p>
2996
+ <p>For data streams, the API retrieves mappings for the stream’s backing indices.</p>
2891
2997
 
2892
2998
 
2893
2999
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping>`_
@@ -2947,7 +3053,6 @@ class IndicesClient(NamespacedClient):
2947
3053
  )
2948
3054
 
2949
3055
  @_rewrite_parameters()
2950
- @_stability_warning(Stability.EXPERIMENTAL)
2951
3056
  def get_migrate_reindex_status(
2952
3057
  self,
2953
3058
  *,
@@ -2991,6 +3096,145 @@ class IndicesClient(NamespacedClient):
2991
3096
  path_parts=__path_parts,
2992
3097
  )
2993
3098
 
3099
+ @_rewrite_parameters()
3100
+ @_availability_warning(Stability.EXPERIMENTAL)
3101
+ def get_sample(
3102
+ self,
3103
+ *,
3104
+ index: str,
3105
+ error_trace: t.Optional[bool] = None,
3106
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3107
+ human: t.Optional[bool] = None,
3108
+ pretty: t.Optional[bool] = None,
3109
+ ) -> ObjectApiResponse[t.Any]:
3110
+ """
3111
+ .. raw:: html
3112
+
3113
+ <p>Request for a random sample of raw documents ingested into the given index or data stream.</p>
3114
+
3115
+
3116
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
3117
+
3118
+ :param index: Single index or data stream name. Wildcards are not supported.
3119
+ """
3120
+ if index in SKIP_IN_PATH:
3121
+ raise ValueError("Empty value passed for parameter 'index'")
3122
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
3123
+ __path = f'/{__path_parts["index"]}/_sample'
3124
+ __query: t.Dict[str, t.Any] = {}
3125
+ if error_trace is not None:
3126
+ __query["error_trace"] = error_trace
3127
+ if filter_path is not None:
3128
+ __query["filter_path"] = filter_path
3129
+ if human is not None:
3130
+ __query["human"] = human
3131
+ if pretty is not None:
3132
+ __query["pretty"] = pretty
3133
+ __headers = {"accept": "application/json"}
3134
+ return self.perform_request( # type: ignore[return-value]
3135
+ "GET",
3136
+ __path,
3137
+ params=__query,
3138
+ headers=__headers,
3139
+ endpoint_id="indices.get_sample",
3140
+ path_parts=__path_parts,
3141
+ )
3142
+
3143
+ @_rewrite_parameters()
3144
+ @_availability_warning(Stability.EXPERIMENTAL)
3145
+ def get_sample_configuration(
3146
+ self,
3147
+ *,
3148
+ index: str,
3149
+ error_trace: t.Optional[bool] = None,
3150
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3151
+ human: t.Optional[bool] = None,
3152
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3153
+ pretty: t.Optional[bool] = None,
3154
+ ) -> ObjectApiResponse[t.Any]:
3155
+ """
3156
+ .. raw:: html
3157
+
3158
+ <p>Get sampling configuration.</p>
3159
+ <p>Get the sampling configuration for the specified index.</p>
3160
+
3161
+
3162
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
3163
+
3164
+ :param index: The name of the index.
3165
+ :param master_timeout: Period to wait for a connection to the master node. If
3166
+ no response is received before the timeout expires, the request fails and
3167
+ returns an error.
3168
+ """
3169
+ if index in SKIP_IN_PATH:
3170
+ raise ValueError("Empty value passed for parameter 'index'")
3171
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
3172
+ __path = f'/{__path_parts["index"]}/_sample/config'
3173
+ __query: t.Dict[str, t.Any] = {}
3174
+ if error_trace is not None:
3175
+ __query["error_trace"] = error_trace
3176
+ if filter_path is not None:
3177
+ __query["filter_path"] = filter_path
3178
+ if human is not None:
3179
+ __query["human"] = human
3180
+ if master_timeout is not None:
3181
+ __query["master_timeout"] = master_timeout
3182
+ if pretty is not None:
3183
+ __query["pretty"] = pretty
3184
+ __headers = {"accept": "application/json"}
3185
+ return self.perform_request( # type: ignore[return-value]
3186
+ "GET",
3187
+ __path,
3188
+ params=__query,
3189
+ headers=__headers,
3190
+ endpoint_id="indices.get_sample_configuration",
3191
+ path_parts=__path_parts,
3192
+ )
3193
+
3194
+ @_rewrite_parameters()
3195
+ @_availability_warning(Stability.EXPERIMENTAL)
3196
+ def get_sample_stats(
3197
+ self,
3198
+ *,
3199
+ index: str,
3200
+ error_trace: t.Optional[bool] = None,
3201
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3202
+ human: t.Optional[bool] = None,
3203
+ pretty: t.Optional[bool] = None,
3204
+ ) -> ObjectApiResponse[t.Any]:
3205
+ """
3206
+ .. raw:: html
3207
+
3208
+ <p>Request stats for a random sample of raw documents ingested into the given index or data stream.</p>
3209
+
3210
+
3211
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
3212
+
3213
+ :param index: Single index or data stream name. Wildcards are not supported.
3214
+ """
3215
+ if index in SKIP_IN_PATH:
3216
+ raise ValueError("Empty value passed for parameter 'index'")
3217
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
3218
+ __path = f'/{__path_parts["index"]}/_sample/stats'
3219
+ __query: t.Dict[str, t.Any] = {}
3220
+ if error_trace is not None:
3221
+ __query["error_trace"] = error_trace
3222
+ if filter_path is not None:
3223
+ __query["filter_path"] = filter_path
3224
+ if human is not None:
3225
+ __query["human"] = human
3226
+ if pretty is not None:
3227
+ __query["pretty"] = pretty
3228
+ __headers = {"accept": "application/json"}
3229
+ return self.perform_request( # type: ignore[return-value]
3230
+ "GET",
3231
+ __path,
3232
+ params=__query,
3233
+ headers=__headers,
3234
+ endpoint_id="indices.get_sample_stats",
3235
+ path_parts=__path_parts,
3236
+ )
3237
+
2994
3238
  @_rewrite_parameters()
2995
3239
  def get_settings(
2996
3240
  self,
@@ -3019,8 +3263,8 @@ class IndicesClient(NamespacedClient):
3019
3263
  """
3020
3264
  .. raw:: html
3021
3265
 
3022
- <p>Get index settings.
3023
- Get setting information for one or more indices.
3266
+ <p>Get index settings.</p>
3267
+ <p>Get setting information for one or more indices.
3024
3268
  For data streams, it returns setting information for the stream's backing indices.</p>
3025
3269
 
3026
3270
 
@@ -3111,8 +3355,8 @@ class IndicesClient(NamespacedClient):
3111
3355
  """
3112
3356
  .. raw:: html
3113
3357
 
3114
- <p>Get legacy index templates.
3115
- Get information about one or more index templates.</p>
3358
+ <p>Get legacy index templates.</p>
3359
+ <p>Get information about one or more index templates.</p>
3116
3360
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
3117
3361
 
3118
3362
 
@@ -3163,7 +3407,6 @@ class IndicesClient(NamespacedClient):
3163
3407
  @_rewrite_parameters(
3164
3408
  body_name="reindex",
3165
3409
  )
3166
- @_stability_warning(Stability.EXPERIMENTAL)
3167
3410
  def migrate_reindex(
3168
3411
  self,
3169
3412
  *,
@@ -3231,8 +3474,8 @@ class IndicesClient(NamespacedClient):
3231
3474
  """
3232
3475
  .. raw:: html
3233
3476
 
3234
- <p>Convert an index alias to a data stream.
3235
- Converts an index alias to a data stream.
3477
+ <p>Convert an index alias to a data stream.</p>
3478
+ <p>Converts an index alias to a data stream.
3236
3479
  You must have a matching index template that is data stream enabled.
3237
3480
  The alias must meet the following criteria:
3238
3481
  The alias must have a write index;
@@ -3296,8 +3539,8 @@ class IndicesClient(NamespacedClient):
3296
3539
  """
3297
3540
  .. raw:: html
3298
3541
 
3299
- <p>Update data streams.
3300
- Performs one or more data stream modification actions in a single atomic operation.</p>
3542
+ <p>Update data streams.</p>
3543
+ <p>Performs one or more data stream modification actions in a single atomic operation.</p>
3301
3544
 
3302
3545
 
3303
3546
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream>`_
@@ -3360,8 +3603,8 @@ class IndicesClient(NamespacedClient):
3360
3603
  """
3361
3604
  .. raw:: html
3362
3605
 
3363
- <p>Open a closed index.
3364
- For data streams, the API opens any closed backing indices.</p>
3606
+ <p>Open a closed index.</p>
3607
+ <p>For data streams, the API opens any closed backing indices.</p>
3365
3608
  <p>A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.
3366
3609
  It is not possible to index documents or to search for documents in a closed index.
3367
3610
  This allows closed indices to not have to maintain internal data structures for indexing or searching documents, resulting in a smaller overhead on the cluster.</p>
@@ -3454,8 +3697,8 @@ class IndicesClient(NamespacedClient):
3454
3697
  """
3455
3698
  .. raw:: html
3456
3699
 
3457
- <p>Promote a data stream.
3458
- Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
3700
+ <p>Promote a data stream.</p>
3701
+ <p>Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
3459
3702
  <p>With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.
3460
3703
  These data streams can't be rolled over in the local cluster.
3461
3704
  These replicated data streams roll over only if the upstream data stream rolls over.
@@ -3467,7 +3710,7 @@ class IndicesClient(NamespacedClient):
3467
3710
 
3468
3711
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-promote-data-stream>`_
3469
3712
 
3470
- :param name: The name of the data stream
3713
+ :param name: The name of the data stream to promote
3471
3714
  :param master_timeout: Period to wait for a connection to the master node. If
3472
3715
  no response is received before the timeout expires, the request fails and
3473
3716
  returns an error.
@@ -3515,20 +3758,20 @@ class IndicesClient(NamespacedClient):
3515
3758
  filter: t.Optional[t.Mapping[str, t.Any]] = None,
3516
3759
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3517
3760
  human: t.Optional[bool] = None,
3518
- index_routing: t.Optional[str] = None,
3761
+ index_routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3519
3762
  is_write_index: t.Optional[bool] = None,
3520
3763
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3521
3764
  pretty: t.Optional[bool] = None,
3522
- routing: t.Optional[str] = None,
3523
- search_routing: t.Optional[str] = None,
3765
+ routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3766
+ search_routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3524
3767
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3525
3768
  body: t.Optional[t.Dict[str, t.Any]] = None,
3526
3769
  ) -> ObjectApiResponse[t.Any]:
3527
3770
  """
3528
3771
  .. raw:: html
3529
3772
 
3530
- <p>Create or update an alias.
3531
- Adds a data stream or index to an alias.</p>
3773
+ <p>Create or update an alias.</p>
3774
+ <p>Adds a data stream or index to an alias.</p>
3532
3775
 
3533
3776
 
3534
3777
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias>`_
@@ -3606,14 +3849,22 @@ class IndicesClient(NamespacedClient):
3606
3849
  )
3607
3850
 
3608
3851
  @_rewrite_parameters(
3609
- body_fields=("data_retention", "downsampling", "enabled"),
3852
+ body_fields=(
3853
+ "data_retention",
3854
+ "downsampling",
3855
+ "downsampling_method",
3856
+ "enabled",
3857
+ ),
3610
3858
  )
3611
3859
  def put_data_lifecycle(
3612
3860
  self,
3613
3861
  *,
3614
3862
  name: t.Union[str, t.Sequence[str]],
3615
3863
  data_retention: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3616
- downsampling: t.Optional[t.Mapping[str, t.Any]] = None,
3864
+ downsampling: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
3865
+ downsampling_method: t.Optional[
3866
+ t.Union[str, t.Literal["aggregate", "last_value"]]
3867
+ ] = None,
3617
3868
  enabled: t.Optional[bool] = None,
3618
3869
  error_trace: t.Optional[bool] = None,
3619
3870
  expand_wildcards: t.Optional[
@@ -3634,8 +3885,8 @@ class IndicesClient(NamespacedClient):
3634
3885
  """
3635
3886
  .. raw:: html
3636
3887
 
3637
- <p>Update data stream lifecycles.
3638
- Update the data stream lifecycle of the specified data streams.</p>
3888
+ <p>Update data stream lifecycles.</p>
3889
+ <p>Update the data stream lifecycle of the specified data streams.</p>
3639
3890
 
3640
3891
 
3641
3892
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle>`_
@@ -3648,6 +3899,9 @@ class IndicesClient(NamespacedClient):
3648
3899
  will be stored indefinitely.
3649
3900
  :param downsampling: The downsampling configuration to execute for the managed
3650
3901
  backing index after rollover.
3902
+ :param downsampling_method: The method used to downsample the data. There are
3903
+ two options `aggregate` and `last_value`. It requires `downsampling` to be
3904
+ defined. Defaults to `aggregate`.
3651
3905
  :param enabled: If defined, it turns data stream lifecycle on/off (`true`/`false`)
3652
3906
  for this data stream. A data stream lifecycle that's disabled (enabled: `false`)
3653
3907
  will have no effect on the data stream.
@@ -3684,6 +3938,8 @@ class IndicesClient(NamespacedClient):
3684
3938
  __body["data_retention"] = data_retention
3685
3939
  if downsampling is not None:
3686
3940
  __body["downsampling"] = downsampling
3941
+ if downsampling_method is not None:
3942
+ __body["downsampling_method"] = downsampling_method
3687
3943
  if enabled is not None:
3688
3944
  __body["enabled"] = enabled
3689
3945
  __headers = {"accept": "application/json", "content-type": "application/json"}
@@ -3801,8 +4057,8 @@ class IndicesClient(NamespacedClient):
3801
4057
  """
3802
4058
  .. raw:: html
3803
4059
 
3804
- <p>Update data stream options.
3805
- Update the data stream options of the specified data streams.</p>
4060
+ <p>Update data stream options.</p>
4061
+ <p>Update the data stream options of the specified data streams.</p>
3806
4062
 
3807
4063
 
3808
4064
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options>`_
@@ -3972,8 +4228,8 @@ class IndicesClient(NamespacedClient):
3972
4228
  """
3973
4229
  .. raw:: html
3974
4230
 
3975
- <p>Create or update an index template.
3976
- Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
4231
+ <p>Create or update an index template.</p>
4232
+ <p>Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
3977
4233
  <p>Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.
3978
4234
  Index templates are applied during data stream or index creation.
3979
4235
  For data streams, these settings and mappings are applied when the stream's backing indices are created.
@@ -4004,7 +4260,7 @@ class IndicesClient(NamespacedClient):
4004
4260
  via `actions.auto_create_index`. If set to `false`, then indices or data
4005
4261
  streams matching the template must always be explicitly created, and may
4006
4262
  never be automatically created.
4007
- :param cause: User defined reason for creating/updating the index template
4263
+ :param cause: User defined reason for creating or updating the index template
4008
4264
  :param composed_of: An ordered list of component template names. Component templates
4009
4265
  are merged in the order specified, meaning that the last component template
4010
4266
  specified has the highest precedence.
@@ -4019,7 +4275,8 @@ class IndicesClient(NamespacedClient):
4019
4275
  :param ignore_missing_component_templates: The configuration option ignore_missing_component_templates
4020
4276
  can be used when an index template references a component template that might
4021
4277
  not exist
4022
- :param index_patterns: Name of the index template to create.
4278
+ :param index_patterns: Array of wildcard (`*`) expressions used to match the
4279
+ names of data streams and indices during creation.
4023
4280
  :param master_timeout: Period to wait for a connection to the master node. If
4024
4281
  no response is received before the timeout expires, the request fails and
4025
4282
  returns an error.
@@ -4156,8 +4413,8 @@ class IndicesClient(NamespacedClient):
4156
4413
  """
4157
4414
  .. raw:: html
4158
4415
 
4159
- <p>Update field mappings.
4160
- Add new fields to an existing data stream or index.
4416
+ <p>Update field mappings.</p>
4417
+ <p>Add new fields to an existing data stream or index.
4161
4418
  You can use the update mapping API to:</p>
4162
4419
  <ul>
4163
4420
  <li>Add a new field to an existing index</li>
@@ -4174,7 +4431,7 @@ class IndicesClient(NamespacedClient):
4174
4431
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping>`_
4175
4432
 
4176
4433
  :param index: A comma-separated list of index names the mapping should be added
4177
- to (supports wildcards); use `_all` or omit to add the mapping on all indices.
4434
+ to (supports wildcards). Use `_all` or omit to add the mapping on all indices.
4178
4435
  :param allow_no_indices: If `false`, the request returns an error if any wildcard
4179
4436
  expression, index alias, or `_all` value targets only missing or closed indices.
4180
4437
  This behavior applies even if the request targets other open indices.
@@ -4269,6 +4526,95 @@ class IndicesClient(NamespacedClient):
4269
4526
  path_parts=__path_parts,
4270
4527
  )
4271
4528
 
4529
+ @_rewrite_parameters(
4530
+ body_fields=("rate", "if_", "max_samples", "max_size", "time_to_live"),
4531
+ parameter_aliases={"if": "if_"},
4532
+ )
4533
+ @_availability_warning(Stability.EXPERIMENTAL)
4534
+ def put_sample_configuration(
4535
+ self,
4536
+ *,
4537
+ index: str,
4538
+ rate: t.Optional[t.Union[str, t.Any]] = None,
4539
+ error_trace: t.Optional[bool] = None,
4540
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
4541
+ human: t.Optional[bool] = None,
4542
+ if_: t.Optional[str] = None,
4543
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4544
+ max_samples: t.Optional[int] = None,
4545
+ max_size: t.Optional[t.Union[int, str]] = None,
4546
+ pretty: t.Optional[bool] = None,
4547
+ time_to_live: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4548
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4549
+ body: t.Optional[t.Dict[str, t.Any]] = None,
4550
+ ) -> ObjectApiResponse[t.Any]:
4551
+ """
4552
+ .. raw:: html
4553
+
4554
+ <p>Create or update sampling configuration.</p>
4555
+ <p>Create or update the sampling configuration for the specified index.</p>
4556
+
4557
+
4558
+ `<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
4559
+
4560
+ :param index: The name of the index or data stream.
4561
+ :param rate: The fraction of documents to sample. Must be greater than 0 and
4562
+ less than or equal to 1. Can be specified as a number or a string.
4563
+ :param if_: An optional condition script that sampled documents must satisfy.
4564
+ :param master_timeout: Period to wait for a connection to the master node. If
4565
+ no response is received before the timeout expires, the request fails and
4566
+ returns an error.
4567
+ :param max_samples: The maximum number of documents to sample. Must be greater
4568
+ than 0 and less than or equal to 10,000.
4569
+ :param max_size: The maximum total size of sampled documents. Must be greater
4570
+ than 0 and less than or equal to 5GB.
4571
+ :param time_to_live: The duration for which the sampled documents should be retained.
4572
+ Must be greater than 0 and less than or equal to 30 days.
4573
+ :param timeout: Period to wait for a response. If no response is received before
4574
+ the timeout expires, the request fails and returns an error.
4575
+ """
4576
+ if index in SKIP_IN_PATH:
4577
+ raise ValueError("Empty value passed for parameter 'index'")
4578
+ if rate is None and body is None:
4579
+ raise ValueError("Empty value passed for parameter 'rate'")
4580
+ __path_parts: t.Dict[str, str] = {"index": _quote(index)}
4581
+ __path = f'/{__path_parts["index"]}/_sample/config'
4582
+ __query: t.Dict[str, t.Any] = {}
4583
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
4584
+ if error_trace is not None:
4585
+ __query["error_trace"] = error_trace
4586
+ if filter_path is not None:
4587
+ __query["filter_path"] = filter_path
4588
+ if human is not None:
4589
+ __query["human"] = human
4590
+ if master_timeout is not None:
4591
+ __query["master_timeout"] = master_timeout
4592
+ if pretty is not None:
4593
+ __query["pretty"] = pretty
4594
+ if timeout is not None:
4595
+ __query["timeout"] = timeout
4596
+ if not __body:
4597
+ if rate is not None:
4598
+ __body["rate"] = rate
4599
+ if if_ is not None:
4600
+ __body["if"] = if_
4601
+ if max_samples is not None:
4602
+ __body["max_samples"] = max_samples
4603
+ if max_size is not None:
4604
+ __body["max_size"] = max_size
4605
+ if time_to_live is not None:
4606
+ __body["time_to_live"] = time_to_live
4607
+ __headers = {"accept": "application/json", "content-type": "application/json"}
4608
+ return self.perform_request( # type: ignore[return-value]
4609
+ "PUT",
4610
+ __path,
4611
+ params=__query,
4612
+ headers=__headers,
4613
+ body=__body,
4614
+ endpoint_id="indices.put_sample_configuration",
4615
+ path_parts=__path_parts,
4616
+ )
4617
+
4272
4618
  @_rewrite_parameters(
4273
4619
  body_name="settings",
4274
4620
  )
@@ -4301,8 +4647,8 @@ class IndicesClient(NamespacedClient):
4301
4647
  """
4302
4648
  .. raw:: html
4303
4649
 
4304
- <p>Update index settings.
4305
- Changes dynamic index settings in real time.
4650
+ <p>Update index settings.</p>
4651
+ <p>Changes dynamic index settings in real time.
4306
4652
  For data streams, index setting changes are applied to all backing indices by default.</p>
4307
4653
  <p>To revert a setting to the default value, use a null value.
4308
4654
  The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation.
@@ -4455,8 +4801,8 @@ class IndicesClient(NamespacedClient):
4455
4801
  """
4456
4802
  .. raw:: html
4457
4803
 
4458
- <p>Create or update a legacy index template.
4459
- Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
4804
+ <p>Create or update a legacy index template.</p>
4805
+ <p>Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
4460
4806
  Elasticsearch applies templates to new indices based on an index pattern that matches the index name.</p>
4461
4807
  <p>IMPORTANT: This documentation is about legacy index templates, which are deprecated and will be replaced by the composable templates introduced in Elasticsearch 7.8.</p>
4462
4808
  <p>Composable templates always take precedence over legacy templates.
@@ -4476,7 +4822,7 @@ class IndicesClient(NamespacedClient):
4476
4822
 
4477
4823
  :param name: The name of the template
4478
4824
  :param aliases: Aliases for the index.
4479
- :param cause: User defined reason for creating/updating the index template
4825
+ :param cause: User defined reason for creating or updating the index template
4480
4826
  :param create: If true, this request cannot replace or update existing index
4481
4827
  templates.
4482
4828
  :param index_patterns: Array of wildcard expressions used to match the names
@@ -4563,8 +4909,8 @@ class IndicesClient(NamespacedClient):
4563
4909
  """
4564
4910
  .. raw:: html
4565
4911
 
4566
- <p>Get index recovery information.
4567
- Get information about ongoing and completed shard recoveries for one or more indices.
4912
+ <p>Get index recovery information.</p>
4913
+ <p>Get information about ongoing and completed shard recoveries for one or more indices.
4568
4914
  For data streams, the API returns information for the stream's backing indices.</p>
4569
4915
  <p>All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.</p>
4570
4916
  <p>Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or creating a replica shard from a primary shard.
@@ -4661,8 +5007,8 @@ class IndicesClient(NamespacedClient):
4661
5007
  """
4662
5008
  .. raw:: html
4663
5009
 
4664
- <p>Refresh an index.
4665
- A refresh makes recent operations performed on one or more indices available for search.
5010
+ <p>Refresh an index.</p>
5011
+ <p>A refresh makes recent operations performed on one or more indices available for search.
4666
5012
  For data streams, the API runs the refresh operation on the stream’s backing indices.</p>
4667
5013
  <p>By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.
4668
5014
  You can change this default interval with the <code>index.refresh_interval</code> setting.</p>
@@ -4745,8 +5091,8 @@ class IndicesClient(NamespacedClient):
4745
5091
  """
4746
5092
  .. raw:: html
4747
5093
 
4748
- <p>Reload search analyzers.
4749
- Reload an index's search analyzers and their resources.
5094
+ <p>Reload search analyzers.</p>
5095
+ <p>Reload an index's search analyzers and their resources.
4750
5096
  For data streams, the API reloads search analyzers and resources for the stream's backing indices.</p>
4751
5097
  <p>IMPORTANT: After reloading the search analyzers you should clear the request cache to make sure it doesn't contain responses derived from the previous versions of the analyzer.</p>
4752
5098
  <p>You can use the reload search analyzers API to pick up changes to synonym files used in the <code>synonym_graph</code> or <code>synonym</code> token filter of a search analyzer.
@@ -4805,7 +5151,7 @@ class IndicesClient(NamespacedClient):
4805
5151
  def remove_block(
4806
5152
  self,
4807
5153
  *,
4808
- index: str,
5154
+ index: t.Union[str, t.Sequence[str]],
4809
5155
  block: t.Union[str, t.Literal["metadata", "read", "read_only", "write"]],
4810
5156
  allow_no_indices: t.Optional[bool] = None,
4811
5157
  error_trace: t.Optional[bool] = None,
@@ -5037,7 +5383,9 @@ class IndicesClient(NamespacedClient):
5037
5383
  path_parts=__path_parts,
5038
5384
  )
5039
5385
 
5040
- @_rewrite_parameters()
5386
+ @_rewrite_parameters(
5387
+ body_fields=("project_routing",),
5388
+ )
5041
5389
  def resolve_index(
5042
5390
  self,
5043
5391
  *,
@@ -5067,12 +5415,13 @@ class IndicesClient(NamespacedClient):
5067
5415
  ] = None,
5068
5416
  pretty: t.Optional[bool] = None,
5069
5417
  project_routing: t.Optional[str] = None,
5418
+ body: t.Optional[t.Dict[str, t.Any]] = None,
5070
5419
  ) -> ObjectApiResponse[t.Any]:
5071
5420
  """
5072
5421
  .. raw:: html
5073
5422
 
5074
- <p>Resolve indices.
5075
- Resolve the names and/or index patterns for indices, aliases, and data streams.
5423
+ <p>Resolve indices.</p>
5424
+ <p>Resolve the names and/or index patterns for indices, aliases, and data streams.
5076
5425
  Multiple patterns and remote clusters are supported.</p>
5077
5426
 
5078
5427
 
@@ -5104,6 +5453,7 @@ class IndicesClient(NamespacedClient):
5104
5453
  __path_parts: t.Dict[str, str] = {"name": _quote(name)}
5105
5454
  __path = f'/_resolve/index/{__path_parts["name"]}'
5106
5455
  __query: t.Dict[str, t.Any] = {}
5456
+ __body: t.Dict[str, t.Any] = body if body is not None else {}
5107
5457
  if allow_no_indices is not None:
5108
5458
  __query["allow_no_indices"] = allow_no_indices
5109
5459
  if error_trace is not None:
@@ -5120,14 +5470,20 @@ class IndicesClient(NamespacedClient):
5120
5470
  __query["mode"] = mode
5121
5471
  if pretty is not None:
5122
5472
  __query["pretty"] = pretty
5123
- if project_routing is not None:
5124
- __query["project_routing"] = project_routing
5473
+ if not __body:
5474
+ if project_routing is not None:
5475
+ __body["project_routing"] = project_routing
5476
+ if not __body:
5477
+ __body = None # type: ignore[assignment]
5125
5478
  __headers = {"accept": "application/json"}
5479
+ if __body is not None:
5480
+ __headers["content-type"] = "application/json"
5126
5481
  return self.perform_request( # type: ignore[return-value]
5127
- "GET",
5482
+ "POST",
5128
5483
  __path,
5129
5484
  params=__query,
5130
5485
  headers=__headers,
5486
+ body=__body,
5131
5487
  endpoint_id="indices.resolve_index",
5132
5488
  path_parts=__path_parts,
5133
5489
  )
@@ -5160,8 +5516,8 @@ class IndicesClient(NamespacedClient):
5160
5516
  """
5161
5517
  .. raw:: html
5162
5518
 
5163
- <p>Roll over to a new index.
5164
- TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.</p>
5519
+ <p>Roll over to a new index.</p>
5520
+ <p>TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context.</p>
5165
5521
  <p>The rollover API creates a new index for a data stream or index alias.
5166
5522
  The API behavior depends on the rollover target.</p>
5167
5523
  <p><strong>Roll over a data stream</strong></p>
@@ -5297,8 +5653,8 @@ class IndicesClient(NamespacedClient):
5297
5653
  """
5298
5654
  .. raw:: html
5299
5655
 
5300
- <p>Get index segments.
5301
- Get low-level information about the Lucene segments in index shards.
5656
+ <p>Get index segments.</p>
5657
+ <p>Get low-level information about the Lucene segments in index shards.
5302
5658
  For data streams, the API returns information about the stream's backing indices.</p>
5303
5659
 
5304
5660
 
@@ -5378,8 +5734,8 @@ class IndicesClient(NamespacedClient):
5378
5734
  """
5379
5735
  .. raw:: html
5380
5736
 
5381
- <p>Get index shard stores.
5382
- Get store information about replica shards in one or more indices.
5737
+ <p>Get index shard stores.</p>
5738
+ <p>Get store information about replica shards in one or more indices.
5383
5739
  For data streams, the API retrieves store information for the stream's backing indices.</p>
5384
5740
  <p>The index shard stores API returns the following information:</p>
5385
5741
  <ul>
@@ -5462,8 +5818,8 @@ class IndicesClient(NamespacedClient):
5462
5818
  """
5463
5819
  .. raw:: html
5464
5820
 
5465
- <p>Shrink an index.
5466
- Shrink an index into a new index with fewer primary shards.</p>
5821
+ <p>Shrink an index.</p>
5822
+ <p>Shrink an index into a new index with fewer primary shards.</p>
5467
5823
  <p>Before you can shrink an index:</p>
5468
5824
  <ul>
5469
5825
  <li>The index must be read-only.</li>
@@ -5570,8 +5926,8 @@ class IndicesClient(NamespacedClient):
5570
5926
  """
5571
5927
  .. raw:: html
5572
5928
 
5573
- <p>Simulate an index.
5574
- Get the index configuration that would be applied to the specified index from an existing index template.</p>
5929
+ <p>Simulate an index.</p>
5930
+ <p>Get the index configuration that would be applied to the specified index from an existing index template.</p>
5575
5931
 
5576
5932
 
5577
5933
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template>`_
@@ -5669,8 +6025,8 @@ class IndicesClient(NamespacedClient):
5669
6025
  """
5670
6026
  .. raw:: html
5671
6027
 
5672
- <p>Simulate an index template.
5673
- Get the index configuration that would be applied by a particular index template.</p>
6028
+ <p>Simulate an index template.</p>
6029
+ <p>Get the index configuration that would be applied by a particular index template.</p>
5674
6030
 
5675
6031
 
5676
6032
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template>`_
@@ -5808,8 +6164,8 @@ class IndicesClient(NamespacedClient):
5808
6164
  """
5809
6165
  .. raw:: html
5810
6166
 
5811
- <p>Split an index.
5812
- Split an index into a new index with more primary shards.</p>
6167
+ <p>Split an index.</p>
6168
+ <p>Split an index into a new index with more primary shards.</p>
5813
6169
  <ul>
5814
6170
  <li>
5815
6171
  <p>Before you can split an index:</p>
@@ -5906,7 +6262,66 @@ class IndicesClient(NamespacedClient):
5906
6262
  self,
5907
6263
  *,
5908
6264
  index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
5909
- metric: t.Optional[t.Union[str, t.Sequence[str]]] = None,
6265
+ metric: t.Optional[
6266
+ t.Union[
6267
+ t.Sequence[
6268
+ t.Union[
6269
+ str,
6270
+ t.Literal[
6271
+ "_all",
6272
+ "bulk",
6273
+ "completion",
6274
+ "dense_vector",
6275
+ "docs",
6276
+ "fielddata",
6277
+ "flush",
6278
+ "get",
6279
+ "indexing",
6280
+ "mappings",
6281
+ "merge",
6282
+ "query_cache",
6283
+ "recovery",
6284
+ "refresh",
6285
+ "request_cache",
6286
+ "search",
6287
+ "segments",
6288
+ "shard_stats",
6289
+ "sparse_vector",
6290
+ "store",
6291
+ "translog",
6292
+ "warmer",
6293
+ ],
6294
+ ]
6295
+ ],
6296
+ t.Union[
6297
+ str,
6298
+ t.Literal[
6299
+ "_all",
6300
+ "bulk",
6301
+ "completion",
6302
+ "dense_vector",
6303
+ "docs",
6304
+ "fielddata",
6305
+ "flush",
6306
+ "get",
6307
+ "indexing",
6308
+ "mappings",
6309
+ "merge",
6310
+ "query_cache",
6311
+ "recovery",
6312
+ "refresh",
6313
+ "request_cache",
6314
+ "search",
6315
+ "segments",
6316
+ "shard_stats",
6317
+ "sparse_vector",
6318
+ "store",
6319
+ "translog",
6320
+ "warmer",
6321
+ ],
6322
+ ],
6323
+ ]
6324
+ ] = None,
5910
6325
  completion_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
5911
6326
  error_trace: t.Optional[bool] = None,
5912
6327
  expand_wildcards: t.Optional[
@@ -5933,8 +6348,8 @@ class IndicesClient(NamespacedClient):
5933
6348
  """
5934
6349
  .. raw:: html
5935
6350
 
5936
- <p>Get index statistics.
5937
- For data streams, the API retrieves statistics for the stream's backing indices.</p>
6351
+ <p>Get index statistics.</p>
6352
+ <p>For data streams, the API retrieves statistics for the stream's backing indices.</p>
5938
6353
  <p>By default, the returned statistics are index-level with <code>primaries</code> and <code>total</code> aggregations.
5939
6354
  <code>primaries</code> are the values for only the primary shards.
5940
6355
  <code>total</code> are the accumulated values for both primary and replica shards.</p>
@@ -5947,7 +6362,7 @@ class IndicesClient(NamespacedClient):
5947
6362
 
5948
6363
  :param index: A comma-separated list of index names; use `_all` or empty string
5949
6364
  to perform the operation on all indices
5950
- :param metric: Limit the information returned the specific metrics.
6365
+ :param metric: Limit the information returned the specific metrics
5951
6366
  :param completion_fields: Comma-separated list or wildcard expressions of fields
5952
6367
  to include in fielddata and suggest statistics.
5953
6368
  :param expand_wildcards: Type of index that wildcard patterns can match. If the
@@ -6038,8 +6453,8 @@ class IndicesClient(NamespacedClient):
6038
6453
  """
6039
6454
  .. raw:: html
6040
6455
 
6041
- <p>Create or update an alias.
6042
- Adds a data stream or index to an alias.</p>
6456
+ <p>Create or update an alias.</p>
6457
+ <p>Adds a data stream or index to an alias.</p>
6043
6458
 
6044
6459
 
6045
6460
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases>`_
@@ -6117,8 +6532,8 @@ class IndicesClient(NamespacedClient):
6117
6532
  """
6118
6533
  .. raw:: html
6119
6534
 
6120
- <p>Validate a query.
6121
- Validates a query without running it.</p>
6535
+ <p>Validate a query.</p>
6536
+ <p>Validates a query without running it.</p>
6122
6537
 
6123
6538
 
6124
6539
  `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query>`_