elasticsearch 8.16.0__py3-none-any.whl → 8.17.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 (90) hide show
  1. elasticsearch/_async/client/__init__.py +234 -96
  2. elasticsearch/_async/client/async_search.py +12 -22
  3. elasticsearch/_async/client/autoscaling.py +39 -4
  4. elasticsearch/_async/client/cat.py +90 -221
  5. elasticsearch/_async/client/ccr.py +85 -35
  6. elasticsearch/_async/client/cluster.py +160 -68
  7. elasticsearch/_async/client/connector.py +362 -25
  8. elasticsearch/_async/client/dangling_indices.py +3 -3
  9. elasticsearch/_async/client/enrich.py +6 -6
  10. elasticsearch/_async/client/eql.py +13 -11
  11. elasticsearch/_async/client/esql.py +3 -2
  12. elasticsearch/_async/client/features.py +27 -5
  13. elasticsearch/_async/client/fleet.py +1 -1
  14. elasticsearch/_async/client/graph.py +9 -3
  15. elasticsearch/_async/client/ilm.py +74 -39
  16. elasticsearch/_async/client/indices.py +633 -152
  17. elasticsearch/_async/client/inference.py +99 -16
  18. elasticsearch/_async/client/ingest.py +201 -23
  19. elasticsearch/_async/client/license.py +38 -22
  20. elasticsearch/_async/client/logstash.py +12 -9
  21. elasticsearch/_async/client/migration.py +17 -8
  22. elasticsearch/_async/client/ml.py +137 -79
  23. elasticsearch/_async/client/monitoring.py +3 -2
  24. elasticsearch/_async/client/nodes.py +37 -23
  25. elasticsearch/_async/client/query_rules.py +47 -25
  26. elasticsearch/_async/client/rollup.py +96 -21
  27. elasticsearch/_async/client/search_application.py +138 -9
  28. elasticsearch/_async/client/searchable_snapshots.py +33 -24
  29. elasticsearch/_async/client/security.py +751 -123
  30. elasticsearch/_async/client/shutdown.py +38 -15
  31. elasticsearch/_async/client/simulate.py +151 -0
  32. elasticsearch/_async/client/slm.py +147 -28
  33. elasticsearch/_async/client/snapshot.py +309 -25
  34. elasticsearch/_async/client/sql.py +79 -58
  35. elasticsearch/_async/client/ssl.py +1 -1
  36. elasticsearch/_async/client/synonyms.py +52 -29
  37. elasticsearch/_async/client/tasks.py +71 -31
  38. elasticsearch/_async/client/text_structure.py +468 -48
  39. elasticsearch/_async/client/transform.py +21 -14
  40. elasticsearch/_async/client/watcher.py +226 -60
  41. elasticsearch/_async/client/xpack.py +13 -8
  42. elasticsearch/_sync/client/__init__.py +234 -96
  43. elasticsearch/_sync/client/async_search.py +12 -22
  44. elasticsearch/_sync/client/autoscaling.py +39 -4
  45. elasticsearch/_sync/client/cat.py +90 -221
  46. elasticsearch/_sync/client/ccr.py +85 -35
  47. elasticsearch/_sync/client/cluster.py +160 -68
  48. elasticsearch/_sync/client/connector.py +362 -25
  49. elasticsearch/_sync/client/dangling_indices.py +3 -3
  50. elasticsearch/_sync/client/enrich.py +6 -6
  51. elasticsearch/_sync/client/eql.py +13 -11
  52. elasticsearch/_sync/client/esql.py +3 -2
  53. elasticsearch/_sync/client/features.py +27 -5
  54. elasticsearch/_sync/client/fleet.py +1 -1
  55. elasticsearch/_sync/client/graph.py +9 -3
  56. elasticsearch/_sync/client/ilm.py +74 -39
  57. elasticsearch/_sync/client/indices.py +633 -152
  58. elasticsearch/_sync/client/inference.py +99 -16
  59. elasticsearch/_sync/client/ingest.py +201 -23
  60. elasticsearch/_sync/client/license.py +38 -22
  61. elasticsearch/_sync/client/logstash.py +12 -9
  62. elasticsearch/_sync/client/migration.py +17 -8
  63. elasticsearch/_sync/client/ml.py +137 -79
  64. elasticsearch/_sync/client/monitoring.py +3 -2
  65. elasticsearch/_sync/client/nodes.py +37 -23
  66. elasticsearch/_sync/client/query_rules.py +47 -25
  67. elasticsearch/_sync/client/rollup.py +96 -21
  68. elasticsearch/_sync/client/search_application.py +138 -9
  69. elasticsearch/_sync/client/searchable_snapshots.py +33 -24
  70. elasticsearch/_sync/client/security.py +751 -123
  71. elasticsearch/_sync/client/shutdown.py +38 -15
  72. elasticsearch/_sync/client/simulate.py +151 -0
  73. elasticsearch/_sync/client/slm.py +147 -28
  74. elasticsearch/_sync/client/snapshot.py +309 -25
  75. elasticsearch/_sync/client/sql.py +79 -58
  76. elasticsearch/_sync/client/ssl.py +1 -1
  77. elasticsearch/_sync/client/synonyms.py +52 -29
  78. elasticsearch/_sync/client/tasks.py +71 -31
  79. elasticsearch/_sync/client/text_structure.py +468 -48
  80. elasticsearch/_sync/client/transform.py +21 -14
  81. elasticsearch/_sync/client/watcher.py +226 -60
  82. elasticsearch/_sync/client/xpack.py +13 -8
  83. elasticsearch/_version.py +1 -1
  84. elasticsearch/client.py +2 -0
  85. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
  86. elasticsearch-8.17.1.dist-info/RECORD +119 -0
  87. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
  88. elasticsearch-8.16.0.dist-info/RECORD +0 -117
  89. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
  90. {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
@@ -58,7 +58,7 @@ class IndicesClient(NamespacedClient):
58
58
  Add an index block. Limits the operations allowed on an index by blocking specific
59
59
  operation types.
60
60
 
61
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/index-modules-blocks.html>`_
61
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-modules-blocks.html>`_
62
62
 
63
63
  :param index: A comma separated list of indices to add a block to
64
64
  :param block: The block to add (one of read, write, read_only or metadata)
@@ -143,10 +143,14 @@ class IndicesClient(NamespacedClient):
143
143
  body: t.Optional[t.Dict[str, t.Any]] = None,
144
144
  ) -> ObjectApiResponse[t.Any]:
145
145
  """
146
- Get tokens from text analysis. The analyze API performs [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html)
147
- on a text string and returns the resulting tokens.
146
+ Get tokens from text analysis. The analyze API performs analysis on a text string
147
+ and returns the resulting tokens. Generating excessive amount of tokens may cause
148
+ a node to run out of memory. The `index.analyze.max_token_count` setting enables
149
+ you to limit the number of tokens that can be produced. If more than this limit
150
+ of tokens gets generated, an error occurs. The `_analyze` endpoint without a
151
+ specified index will always use `10000` as its limit.
148
152
 
149
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-analyze.html>`_
153
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-analyze.html>`_
150
154
 
151
155
  :param index: Index used to derive the analyzer. If specified, the `analyzer`
152
156
  or field parameter overrides this value. If no index is specified or the
@@ -245,10 +249,13 @@ class IndicesClient(NamespacedClient):
245
249
  request: t.Optional[bool] = None,
246
250
  ) -> ObjectApiResponse[t.Any]:
247
251
  """
248
- Clears the caches of one or more indices. For data streams, the API clears the
249
- caches of the streams backing indices.
252
+ Clear the cache. Clear the cache of one or more indices. For data streams, the
253
+ API clears the caches of the stream's backing indices. By default, the clear
254
+ cache API clears all caches. To clear only specific caches, use the `fielddata`,
255
+ `query`, or `request` parameters. To clear the cache only of specific fields,
256
+ use the `fields` parameter.
250
257
 
251
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-clearcache.html>`_
258
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clearcache.html>`_
252
259
 
253
260
  :param index: Comma-separated list of data streams, indices, and aliases used
254
261
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -331,9 +338,46 @@ class IndicesClient(NamespacedClient):
331
338
  body: t.Optional[t.Dict[str, t.Any]] = None,
332
339
  ) -> ObjectApiResponse[t.Any]:
333
340
  """
334
- Clones an existing index.
335
-
336
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-clone-index.html>`_
341
+ Clone an index. Clone an existing index into a new index. Each original primary
342
+ shard is cloned into a new primary shard in the new index. IMPORTANT: Elasticsearch
343
+ does not apply index templates to the resulting index. The API also does not
344
+ copy index metadata from the original index. Index metadata includes aliases,
345
+ index lifecycle management phase definitions, and cross-cluster replication (CCR)
346
+ follower information. For example, if you clone a CCR follower index, the resulting
347
+ clone will not be a follower index. The clone API copies most index settings
348
+ from the source index to the resulting index, with the exception of `index.number_of_replicas`
349
+ and `index.auto_expand_replicas`. To set the number of replicas in the resulting
350
+ index, configure these settings in the clone request. Cloning works as follows:
351
+ * First, it creates a new target index with the same definition as the source
352
+ index. * Then it hard-links segments from the source index into the target index.
353
+ If the file system does not support hard-linking, all segments are copied into
354
+ the new index, which is a much more time consuming process. * Finally, it recovers
355
+ the target index as though it were a closed index which had just been re-opened.
356
+ IMPORTANT: Indices can only be cloned if they meet the following requirements:
357
+ * The index must be marked as read-only and have a cluster health status of green.
358
+ * The target index must not exist. * The source index must have the same number
359
+ of primary shards as the target index. * The node handling the clone process
360
+ must have sufficient free disk space to accommodate a second copy of the existing
361
+ index. The current write index on a data stream cannot be cloned. In order to
362
+ clone the current write index, the data stream must first be rolled over so that
363
+ a new write index is created and then the previous write index can be cloned.
364
+ NOTE: Mappings cannot be specified in the `_clone` request. The mappings of the
365
+ source index will be used for the target index. **Monitor the cloning process**
366
+ The cloning process can be monitored with the cat recovery API or the cluster
367
+ health API can be used to wait until all primary shards have been allocated by
368
+ setting the `wait_for_status` parameter to `yellow`. The `_clone` API returns
369
+ as soon as the target index has been added to the cluster state, before any shards
370
+ have been allocated. At this point, all shards are in the state unassigned. If,
371
+ for any reason, the target index can't be allocated, its primary shard will remain
372
+ unassigned until it can be allocated on that node. Once the primary shard is
373
+ allocated, it moves to state initializing, and the clone process begins. When
374
+ the clone operation completes, the shard will become active. At that point, Elasticsearch
375
+ will try to allocate any replicas and may decide to relocate the primary shard
376
+ to another node. **Wait for active shards** Because the clone operation creates
377
+ a new index to clone the shards to, the wait for active shards setting on index
378
+ creation applies to the clone index action as well.
379
+
380
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clone-index.html>`_
337
381
 
338
382
  :param index: Name of the source index to clone.
339
383
  :param target: Name of the target index to create.
@@ -419,9 +463,26 @@ class IndicesClient(NamespacedClient):
419
463
  ] = None,
420
464
  ) -> ObjectApiResponse[t.Any]:
421
465
  """
422
- Closes an index.
423
-
424
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-close.html>`_
466
+ Close an index. A closed index is blocked for read or write operations and does
467
+ not allow all operations that opened indices allow. It is not possible to index
468
+ documents or to search for documents in a closed index. Closed indices do not
469
+ have to maintain internal data structures for indexing or searching documents,
470
+ which results in a smaller overhead on the cluster. When opening or closing an
471
+ index, the master node is responsible for restarting the index shards to reflect
472
+ the new state of the index. The shards will then go through the normal recovery
473
+ process. The data of opened and closed indices is automatically replicated by
474
+ the cluster to ensure that enough shard copies are safely kept around at all
475
+ times. You can open and close multiple indices. An error is thrown if the request
476
+ explicitly refers to a missing index. This behaviour can be turned off using
477
+ the `ignore_unavailable=true` parameter. By default, you must explicitly name
478
+ the indices you are opening or closing. To open or close indices with `_all`,
479
+ `*`, or other wildcard expressions, change the` action.destructive_requires_name`
480
+ setting to `false`. This setting can also be changed with the cluster update
481
+ settings API. Closed indices consume a significant amount of disk-space which
482
+ can cause problems in managed environments. Closing indices can be turned off
483
+ with the cluster settings API by setting `cluster.indices.close.enable` to `false`.
484
+
485
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-close.html>`_
425
486
 
426
487
  :param index: Comma-separated list or wildcard expression of index names used
427
488
  to limit the request.
@@ -500,9 +561,28 @@ class IndicesClient(NamespacedClient):
500
561
  body: t.Optional[t.Dict[str, t.Any]] = None,
501
562
  ) -> ObjectApiResponse[t.Any]:
502
563
  """
503
- Create an index. Creates a new index.
504
-
505
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-create-index.html>`_
564
+ Create an index. You can use the create index API to add a new index to an Elasticsearch
565
+ cluster. When creating an index, you can specify the following: * Settings for
566
+ the index. * Mappings for fields in the index. * Index aliases **Wait for active
567
+ shards** By default, index creation will only return a response to the client
568
+ when the primary copies of each shard have been started, or the request times
569
+ out. The index creation response will indicate what happened. For example, `acknowledged`
570
+ indicates whether the index was successfully created in the cluster, `while shards_acknowledged`
571
+ indicates whether the requisite number of shard copies were started for each
572
+ shard in the index before timing out. Note that it is still possible for either
573
+ `acknowledged` or `shards_acknowledged` to be `false`, but for the index creation
574
+ to be successful. These values simply indicate whether the operation completed
575
+ before the timeout. If `acknowledged` is false, the request timed out before
576
+ the cluster state was updated with the newly created index, but it probably will
577
+ be created sometime soon. If `shards_acknowledged` is false, then the request
578
+ timed out before the requisite number of shards were started (by default just
579
+ the primaries), even if the cluster state was successfully updated to reflect
580
+ the newly created index (that is to say, `acknowledged` is `true`). You can change
581
+ the default of only waiting for the primary shards to start through the index
582
+ setting `index.write.wait_for_active_shards`. Note that changing this setting
583
+ will also affect the `wait_for_active_shards` value on all subsequent write operations.
584
+
585
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-create-index.html>`_
506
586
 
507
587
  :param index: Name of the index you wish to create.
508
588
  :param aliases: Aliases for the index.
@@ -576,7 +656,7 @@ class IndicesClient(NamespacedClient):
576
656
  Create a data stream. Creates a data stream. You must have a matching index template
577
657
  with data stream enabled.
578
658
 
579
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
659
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
580
660
 
581
661
  :param name: Name of the data stream, which must meet the following criteria:
582
662
  Lowercase only; Cannot include `\\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`,
@@ -637,7 +717,7 @@ class IndicesClient(NamespacedClient):
637
717
  """
638
718
  Get data stream stats. Retrieves statistics for one or more data streams.
639
719
 
640
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
720
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
641
721
 
642
722
  :param name: Comma-separated list of data streams used to limit the request.
643
723
  Wildcard expressions (`*`) are supported. To target all data streams in a
@@ -696,9 +776,13 @@ class IndicesClient(NamespacedClient):
696
776
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
697
777
  ) -> ObjectApiResponse[t.Any]:
698
778
  """
699
- Delete indices. Deletes one or more indices.
779
+ Delete indices. Deleting an index deletes its documents, shards, and metadata.
780
+ It does not delete related Kibana components, such as data views, visualizations,
781
+ or dashboards. You cannot delete the current write index of a data stream. To
782
+ delete the index, you must roll over the data stream so a new write index is
783
+ created. You can then use the delete index API to delete the previous write index.
700
784
 
701
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-delete-index.html>`_
785
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-index.html>`_
702
786
 
703
787
  :param index: Comma-separated list of indices to delete. You cannot specify index
704
788
  aliases. By default, this parameter does not support wildcards (`*`) or `_all`.
@@ -768,7 +852,7 @@ class IndicesClient(NamespacedClient):
768
852
  """
769
853
  Delete an alias. Removes a data stream or index from an alias.
770
854
 
771
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-aliases.html>`_
855
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-alias.html>`_
772
856
 
773
857
  :param index: Comma-separated list of data streams or indices used to limit the
774
858
  request. Supports wildcards (`*`).
@@ -833,7 +917,7 @@ class IndicesClient(NamespacedClient):
833
917
  Delete data stream lifecycles. Removes the data stream lifecycle from a data
834
918
  stream, rendering it not managed by the data stream lifecycle.
835
919
 
836
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams-delete-lifecycle.html>`_
920
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-delete-lifecycle.html>`_
837
921
 
838
922
  :param name: A comma-separated list of data streams of which the data stream
839
923
  lifecycle will be deleted; use `*` to get all data streams
@@ -893,7 +977,7 @@ class IndicesClient(NamespacedClient):
893
977
  """
894
978
  Delete data streams. Deletes one or more data streams and their backing indices.
895
979
 
896
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
980
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
897
981
 
898
982
  :param name: Comma-separated list of data streams to delete. Wildcard (`*`) expressions
899
983
  are supported.
@@ -948,7 +1032,7 @@ class IndicesClient(NamespacedClient):
948
1032
  then there is no wildcard support and the provided names should match completely
949
1033
  with existing templates.
950
1034
 
951
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-delete-template.html>`_
1035
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template.html>`_
952
1036
 
953
1037
  :param name: Comma-separated list of index template names used to limit the request.
954
1038
  Wildcard (*) expressions are supported.
@@ -998,9 +1082,9 @@ class IndicesClient(NamespacedClient):
998
1082
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
999
1083
  ) -> ObjectApiResponse[t.Any]:
1000
1084
  """
1001
- Deletes a legacy index template.
1085
+ Delete a legacy index template.
1002
1086
 
1003
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-delete-template-v1.html>`_
1087
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template-v1.html>`_
1004
1088
 
1005
1089
  :param name: The name of the legacy index template to delete. Wildcard (`*`)
1006
1090
  expressions are supported.
@@ -1061,9 +1145,18 @@ class IndicesClient(NamespacedClient):
1061
1145
  run_expensive_tasks: t.Optional[bool] = None,
1062
1146
  ) -> ObjectApiResponse[t.Any]:
1063
1147
  """
1064
- Analyzes the disk usage of each field of an index or data stream.
1065
-
1066
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-disk-usage.html>`_
1148
+ Analyze the index disk usage. Analyze the disk usage of each field of an index
1149
+ or data stream. This API might not support indices created in previous Elasticsearch
1150
+ versions. The result of a small index can be inaccurate as some parts of an index
1151
+ might not be analyzed by the API. NOTE: The total size of fields of the analyzed
1152
+ shards of the index in the response is usually smaller than the index `store_size`
1153
+ value because some small metadata files are ignored and some parts of data files
1154
+ might not be scanned by the API. Since stored fields are stored together in a
1155
+ compressed format, the sizes of stored fields are also estimates and can be inaccurate.
1156
+ The stored size of the `_id` field is likely underestimated while the `_source`
1157
+ field is overestimated.
1158
+
1159
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-disk-usage.html>`_
1067
1160
 
1068
1161
  :param index: Comma-separated list of data streams, indices, and aliases used
1069
1162
  to limit the request. It’s recommended to execute this API with a single
@@ -1135,11 +1228,16 @@ class IndicesClient(NamespacedClient):
1135
1228
  pretty: t.Optional[bool] = None,
1136
1229
  ) -> ObjectApiResponse[t.Any]:
1137
1230
  """
1138
- Aggregates a time series (TSDS) index and stores pre-computed statistical summaries
1139
- (`min`, `max`, `sum`, `value_count` and `avg`) for each metric field grouped
1140
- by a configured time interval.
1231
+ Downsample an index. Aggregate a time series (TSDS) index and store pre-computed
1232
+ statistical summaries (`min`, `max`, `sum`, `value_count` and `avg`) for each
1233
+ metric field grouped by a configured time interval. For example, a TSDS index
1234
+ that contains metrics sampled every 10 seconds can be downsampled to an hourly
1235
+ index. All documents within an hour interval are summarized and stored as a single
1236
+ document in the downsample index. NOTE: Only indices in a time series data stream
1237
+ are supported. Neither field nor document level security can be defined on the
1238
+ source index. The source index must be read only (`index.blocks.write: true`).
1141
1239
 
1142
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-downsample-data-stream.html>`_
1240
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-downsample-data-stream.html>`_
1143
1241
 
1144
1242
  :param index: Name of the time series index to downsample.
1145
1243
  :param target_index: Name of the index to create.
@@ -1205,10 +1303,9 @@ class IndicesClient(NamespacedClient):
1205
1303
  pretty: t.Optional[bool] = None,
1206
1304
  ) -> HeadApiResponse:
1207
1305
  """
1208
- Check indices. Checks if one or more indices, index aliases, or data streams
1209
- exist.
1306
+ Check indices. Check if one or more indices, index aliases, or data streams exist.
1210
1307
 
1211
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-exists.html>`_
1308
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-exists.html>`_
1212
1309
 
1213
1310
  :param index: Comma-separated list of data streams, indices, and aliases. Supports
1214
1311
  wildcards (`*`).
@@ -1286,7 +1383,7 @@ class IndicesClient(NamespacedClient):
1286
1383
  """
1287
1384
  Check aliases. Checks if one or more data stream or index aliases exist.
1288
1385
 
1289
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-aliases.html>`_
1386
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
1290
1387
 
1291
1388
  :param name: Comma-separated list of aliases to check. Supports wildcards (`*`).
1292
1389
  :param index: Comma-separated list of data streams or indices used to limit the
@@ -1354,9 +1451,9 @@ class IndicesClient(NamespacedClient):
1354
1451
  pretty: t.Optional[bool] = None,
1355
1452
  ) -> HeadApiResponse:
1356
1453
  """
1357
- Returns information about whether a particular index template exists.
1454
+ Check index templates. Check whether index templates exist.
1358
1455
 
1359
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/index-templates.html>`_
1456
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-templates.html>`_
1360
1457
 
1361
1458
  :param name: Comma-separated list of index template names used to limit the request.
1362
1459
  Wildcard (*) expressions are supported.
@@ -1403,16 +1500,21 @@ class IndicesClient(NamespacedClient):
1403
1500
  pretty: t.Optional[bool] = None,
1404
1501
  ) -> HeadApiResponse:
1405
1502
  """
1406
- Check existence of index templates. Returns information about whether a particular
1407
- index template exists.
1408
-
1409
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-template-exists-v1.html>`_
1410
-
1411
- :param name: The comma separated names of the index templates
1412
- :param flat_settings: Return settings in flat format (default: false)
1413
- :param local: Return local information, do not retrieve the state from master
1414
- node (default: false)
1415
- :param master_timeout: Explicit operation timeout for connection to master node
1503
+ Check existence of index templates. Get information about whether index templates
1504
+ exist. Index templates define settings, mappings, and aliases that can be applied
1505
+ automatically to new indices. IMPORTANT: This documentation is about legacy index
1506
+ templates, which are deprecated and will be replaced by the composable templates
1507
+ introduced in Elasticsearch 7.8.
1508
+
1509
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-template-exists-v1.html>`_
1510
+
1511
+ :param name: A comma-separated list of index template names used to limit the
1512
+ request. Wildcard (`*`) expressions are supported.
1513
+ :param flat_settings: Indicates whether to use a flat format for the response.
1514
+ :param local: Indicates whether to get information from the local node only.
1515
+ :param master_timeout: The period to wait for the master node. If the master
1516
+ node is not available before the timeout expires, the request fails and returns
1517
+ an error. To indicate that the request should never timeout, set it to `-1`.
1416
1518
  """
1417
1519
  if name in SKIP_IN_PATH:
1418
1520
  raise ValueError("Empty value passed for parameter 'name'")
@@ -1456,12 +1558,12 @@ class IndicesClient(NamespacedClient):
1456
1558
  pretty: t.Optional[bool] = None,
1457
1559
  ) -> ObjectApiResponse[t.Any]:
1458
1560
  """
1459
- Get the status for a data stream lifecycle. Retrieves information about an index
1460
- or data streams current data stream lifecycle status, such as time since index
1561
+ Get the status for a data stream lifecycle. Get information about an index or
1562
+ data stream's current data stream lifecycle status, such as time since index
1461
1563
  creation, time since rollover, the lifecycle configuration managing the index,
1462
1564
  or any errors encountered during lifecycle execution.
1463
1565
 
1464
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams-explain-lifecycle.html>`_
1566
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-explain-lifecycle.html>`_
1465
1567
 
1466
1568
  :param index: The name of the index to explain
1467
1569
  :param include_defaults: indicates if the API should return the default values
@@ -1523,9 +1625,15 @@ class IndicesClient(NamespacedClient):
1523
1625
  ] = None,
1524
1626
  ) -> ObjectApiResponse[t.Any]:
1525
1627
  """
1526
- Returns field usage information for each shard and field of an index.
1628
+ Get field usage stats. Get field usage information for each shard and field of
1629
+ an index. Field usage statistics are automatically captured when queries are
1630
+ running on a cluster. A shard-level search request that accesses a given field,
1631
+ even if multiple times during that request, is counted as a single use. The response
1632
+ body reports the per-shard usage count of the data structures that back the fields
1633
+ in the index. A given request will increment each count by a maximum value of
1634
+ 1, even if the request accesses the same field multiple times.
1527
1635
 
1528
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/field-usage-stats.html>`_
1636
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/field-usage-stats.html>`_
1529
1637
 
1530
1638
  :param index: Comma-separated list or wildcard expression of index names used
1531
1639
  to limit the request.
@@ -1611,9 +1719,24 @@ class IndicesClient(NamespacedClient):
1611
1719
  wait_if_ongoing: t.Optional[bool] = None,
1612
1720
  ) -> ObjectApiResponse[t.Any]:
1613
1721
  """
1614
- Flushes one or more data streams or indices.
1615
-
1616
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-flush.html>`_
1722
+ Flush data streams or indices. Flushing a data stream or index is the process
1723
+ of making sure that any data that is currently only stored in the transaction
1724
+ log is also permanently stored in the Lucene index. When restarting, Elasticsearch
1725
+ replays any unflushed operations from the transaction log into the Lucene index
1726
+ to bring it back into the state that it was in before the restart. Elasticsearch
1727
+ automatically triggers flushes as needed, using heuristics that trade off the
1728
+ size of the unflushed transaction log against the cost of performing each flush.
1729
+ After each operation has been flushed it is permanently stored in the Lucene
1730
+ index. This may mean that there is no need to maintain an additional copy of
1731
+ it in the transaction log. The transaction log is made up of multiple files,
1732
+ called generations, and Elasticsearch will delete any generation files when they
1733
+ are no longer needed, freeing up disk space. It is also possible to trigger a
1734
+ flush on one or more indices using the flush API, although it is rare for users
1735
+ to need to call this API directly. If you call the flush API after indexing some
1736
+ documents then a successful response indicates that Elasticsearch has flushed
1737
+ all the documents that were indexed before the flush API was called.
1738
+
1739
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-flush.html>`_
1617
1740
 
1618
1741
  :param index: Comma-separated list of data streams, indices, and aliases to flush.
1619
1742
  Supports wildcards (`*`). To flush all data streams and indices, omit this
@@ -1694,9 +1817,51 @@ class IndicesClient(NamespacedClient):
1694
1817
  wait_for_completion: t.Optional[bool] = None,
1695
1818
  ) -> ObjectApiResponse[t.Any]:
1696
1819
  """
1697
- Performs the force merge operation on one or more indices.
1698
-
1699
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-forcemerge.html>`_
1820
+ Force a merge. Perform the force merge operation on the shards of one or more
1821
+ indices. For data streams, the API forces a merge on the shards of the stream's
1822
+ backing indices. Merging reduces the number of segments in each shard by merging
1823
+ some of them together and also frees up the space used by deleted documents.
1824
+ Merging normally happens automatically, but sometimes it is useful to trigger
1825
+ a merge manually. WARNING: We recommend force merging only a read-only index
1826
+ (meaning the index is no longer receiving writes). When documents are updated
1827
+ or deleted, the old version is not immediately removed but instead soft-deleted
1828
+ and marked with a "tombstone". These soft-deleted documents are automatically
1829
+ cleaned up during regular segment merges. But force merge can cause very large
1830
+ (greater than 5 GB) segments to be produced, which are not eligible for regular
1831
+ merges. So the number of soft-deleted documents can then grow rapidly, resulting
1832
+ in higher disk usage and worse search performance. If you regularly force merge
1833
+ an index receiving writes, this can also make snapshots more expensive, since
1834
+ the new documents can't be backed up incrementally. **Blocks during a force merge**
1835
+ Calls to this API block until the merge is complete (unless request contains
1836
+ `wait_for_completion=false`). If the client connection is lost before completion
1837
+ then the force merge process will continue in the background. Any new requests
1838
+ to force merge the same indices will also block until the ongoing force merge
1839
+ is complete. **Running force merge asynchronously** If the request contains `wait_for_completion=false`,
1840
+ Elasticsearch performs some preflight checks, launches the request, and returns
1841
+ a task you can use to get the status of the task. However, you can not cancel
1842
+ this task as the force merge task is not cancelable. Elasticsearch creates a
1843
+ record of this task as a document at `_tasks/<task_id>`. When you are done with
1844
+ a task, you should delete the task document so Elasticsearch can reclaim the
1845
+ space. **Force merging multiple indices** You can force merge multiple indices
1846
+ with a single request by targeting: * One or more data streams that contain multiple
1847
+ backing indices * Multiple indices * One or more aliases * All data streams and
1848
+ indices in a cluster Each targeted shard is force-merged separately using the
1849
+ force_merge threadpool. By default each node only has a single `force_merge`
1850
+ thread which means that the shards on that node are force-merged one at a time.
1851
+ If you expand the `force_merge` threadpool on a node then it will force merge
1852
+ its shards in parallel Force merge makes the storage for the shard being merged
1853
+ temporarily increase, as it may require free space up to triple its size in case
1854
+ `max_num_segments parameter` is set to `1`, to rewrite all segments into a new
1855
+ one. **Data streams and time-based indices** Force-merging is useful for managing
1856
+ a data stream's older backing indices and other time-based indices, particularly
1857
+ after a rollover. In these cases, each index only receives indexing traffic for
1858
+ a certain period of time. Once an index receive no more writes, its shards can
1859
+ be force-merged to a single segment. This can be a good idea because single-segment
1860
+ shards can sometimes use simpler and more efficient data structures to perform
1861
+ searches. For example: ``` POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1
1862
+ ```
1863
+
1864
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-forcemerge.html>`_
1700
1865
 
1701
1866
  :param index: A comma-separated list of index names; use `_all` or empty string
1702
1867
  to perform the operation on all indices
@@ -1787,10 +1952,10 @@ class IndicesClient(NamespacedClient):
1787
1952
  pretty: t.Optional[bool] = None,
1788
1953
  ) -> ObjectApiResponse[t.Any]:
1789
1954
  """
1790
- Get index information. Returns information about one or more indices. For data
1791
- streams, the API returns information about the stream’s backing indices.
1955
+ Get index information. Get information about one or more indices. For data streams,
1956
+ the API returns information about the stream’s backing indices.
1792
1957
 
1793
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-get-index.html>`_
1958
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-index.html>`_
1794
1959
 
1795
1960
  :param index: Comma-separated list of data streams, indices, and index aliases
1796
1961
  used to limit the request. Wildcard expressions (*) are supported.
@@ -1879,7 +2044,7 @@ class IndicesClient(NamespacedClient):
1879
2044
  """
1880
2045
  Get aliases. Retrieves information for one or more data stream or index aliases.
1881
2046
 
1882
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-aliases.html>`_
2047
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-alias.html>`_
1883
2048
 
1884
2049
  :param index: Comma-separated list of data streams or indices used to limit the
1885
2050
  request. Supports wildcards (`*`). To target all data streams and indices,
@@ -1962,7 +2127,7 @@ class IndicesClient(NamespacedClient):
1962
2127
  Get data stream lifecycles. Retrieves the data stream lifecycle configuration
1963
2128
  of one or more data streams.
1964
2129
 
1965
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams-get-lifecycle.html>`_
2130
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle.html>`_
1966
2131
 
1967
2132
  :param name: Comma-separated list of data streams to limit the request. Supports
1968
2133
  wildcards (`*`). To target all data streams, omit this parameter or use `*`
@@ -2004,6 +2169,42 @@ class IndicesClient(NamespacedClient):
2004
2169
  path_parts=__path_parts,
2005
2170
  )
2006
2171
 
2172
+ @_rewrite_parameters()
2173
+ async def get_data_lifecycle_stats(
2174
+ self,
2175
+ *,
2176
+ error_trace: t.Optional[bool] = None,
2177
+ filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
2178
+ human: t.Optional[bool] = None,
2179
+ pretty: t.Optional[bool] = None,
2180
+ ) -> ObjectApiResponse[t.Any]:
2181
+ """
2182
+ Get data stream lifecycle stats. Get statistics about the data streams that are
2183
+ managed by a data stream lifecycle.
2184
+
2185
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle-stats.html>`_
2186
+ """
2187
+ __path_parts: t.Dict[str, str] = {}
2188
+ __path = "/_lifecycle/stats"
2189
+ __query: t.Dict[str, t.Any] = {}
2190
+ if error_trace is not None:
2191
+ __query["error_trace"] = error_trace
2192
+ if filter_path is not None:
2193
+ __query["filter_path"] = filter_path
2194
+ if human is not None:
2195
+ __query["human"] = human
2196
+ if pretty is not None:
2197
+ __query["pretty"] = pretty
2198
+ __headers = {"accept": "application/json"}
2199
+ return await self.perform_request( # type: ignore[return-value]
2200
+ "GET",
2201
+ __path,
2202
+ params=__query,
2203
+ headers=__headers,
2204
+ endpoint_id="indices.get_data_lifecycle_stats",
2205
+ path_parts=__path_parts,
2206
+ )
2207
+
2007
2208
  @_rewrite_parameters()
2008
2209
  async def get_data_stream(
2009
2210
  self,
@@ -2028,7 +2229,7 @@ class IndicesClient(NamespacedClient):
2028
2229
  """
2029
2230
  Get data streams. Retrieves information about one or more data streams.
2030
2231
 
2031
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
2232
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2032
2233
 
2033
2234
  :param name: Comma-separated list of data stream names used to limit the request.
2034
2235
  Wildcard (`*`) expressions are supported. If omitted, all data streams are
@@ -2103,11 +2304,13 @@ class IndicesClient(NamespacedClient):
2103
2304
  """
2104
2305
  Get mapping definitions. Retrieves mapping definitions for one or more fields.
2105
2306
  For data streams, the API retrieves field mappings for the stream’s backing indices.
2307
+ This API is useful if you don't need a complete mapping or if an index mapping
2308
+ contains a large number of fields.
2106
2309
 
2107
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-get-field-mapping.html>`_
2310
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-field-mapping.html>`_
2108
2311
 
2109
2312
  :param fields: Comma-separated list or wildcard expression of fields used to
2110
- limit returned information.
2313
+ limit returned information. Supports wildcards (`*`).
2111
2314
  :param index: Comma-separated list of data streams, indices, and aliases used
2112
2315
  to limit the request. Supports wildcards (`*`). To target all data streams
2113
2316
  and indices, omit this parameter or use `*` or `_all`.
@@ -2179,9 +2382,9 @@ class IndicesClient(NamespacedClient):
2179
2382
  pretty: t.Optional[bool] = None,
2180
2383
  ) -> ObjectApiResponse[t.Any]:
2181
2384
  """
2182
- Get index templates. Returns information about one or more index templates.
2385
+ Get index templates. Get information about one or more index templates.
2183
2386
 
2184
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-get-template.html>`_
2387
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template.html>`_
2185
2388
 
2186
2389
  :param name: Comma-separated list of index template names used to limit the request.
2187
2390
  Wildcard (*) expressions are supported.
@@ -2252,10 +2455,10 @@ class IndicesClient(NamespacedClient):
2252
2455
  pretty: t.Optional[bool] = None,
2253
2456
  ) -> ObjectApiResponse[t.Any]:
2254
2457
  """
2255
- Get mapping definitions. Retrieves mapping definitions for one or more indices.
2256
- For data streams, the API retrieves mappings for the stream’s backing indices.
2458
+ Get mapping definitions. For data streams, the API retrieves mappings for the
2459
+ stream’s backing indices.
2257
2460
 
2258
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-get-mapping.html>`_
2461
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-mapping.html>`_
2259
2462
 
2260
2463
  :param index: Comma-separated list of data streams, indices, and aliases used
2261
2464
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2337,10 +2540,10 @@ class IndicesClient(NamespacedClient):
2337
2540
  pretty: t.Optional[bool] = None,
2338
2541
  ) -> ObjectApiResponse[t.Any]:
2339
2542
  """
2340
- Get index settings. Returns setting information for one or more indices. For
2341
- data streams, returns setting information for the streams backing indices.
2543
+ Get index settings. Get setting information for one or more indices. For data
2544
+ streams, it returns setting information for the stream's backing indices.
2342
2545
 
2343
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-get-settings.html>`_
2546
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-settings.html>`_
2344
2547
 
2345
2548
  :param index: Comma-separated list of data streams, indices, and aliases used
2346
2549
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -2425,9 +2628,11 @@ class IndicesClient(NamespacedClient):
2425
2628
  pretty: t.Optional[bool] = None,
2426
2629
  ) -> ObjectApiResponse[t.Any]:
2427
2630
  """
2428
- Get index templates. Retrieves information about one or more index templates.
2631
+ Get index templates. Get information about one or more index templates. IMPORTANT:
2632
+ This documentation is about legacy index templates, which are deprecated and
2633
+ will be replaced by the composable templates introduced in Elasticsearch 7.8.
2429
2634
 
2430
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-get-template-v1.html>`_
2635
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template-v1.html>`_
2431
2636
 
2432
2637
  :param name: Comma-separated list of index template names used to limit the request.
2433
2638
  Wildcard (`*`) expressions are supported. To return all index templates,
@@ -2493,7 +2698,7 @@ class IndicesClient(NamespacedClient):
2493
2698
  with the same name. The indices for the alias become hidden backing indices for
2494
2699
  the stream. The write index for the alias becomes the write index for the stream.
2495
2700
 
2496
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
2701
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2497
2702
 
2498
2703
  :param name: Name of the index alias to convert to a data stream.
2499
2704
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -2546,7 +2751,7 @@ class IndicesClient(NamespacedClient):
2546
2751
  Update data streams. Performs one or more data stream modification actions in
2547
2752
  a single atomic operation.
2548
2753
 
2549
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
2754
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2550
2755
 
2551
2756
  :param actions: Actions to perform.
2552
2757
  """
@@ -2604,9 +2809,29 @@ class IndicesClient(NamespacedClient):
2604
2809
  ] = None,
2605
2810
  ) -> ObjectApiResponse[t.Any]:
2606
2811
  """
2607
- Opens a closed index. For data streams, the API opens any closed backing indices.
2608
-
2609
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-open-close.html>`_
2812
+ Open a closed index. For data streams, the API opens any closed backing indices.
2813
+ A closed index is blocked for read/write operations and does not allow all operations
2814
+ that opened indices allow. It is not possible to index documents or to search
2815
+ for documents in a closed index. This allows closed indices to not have to maintain
2816
+ internal data structures for indexing or searching documents, resulting in a
2817
+ smaller overhead on the cluster. When opening or closing an index, the master
2818
+ is responsible for restarting the index shards to reflect the new state of the
2819
+ index. The shards will then go through the normal recovery process. The data
2820
+ of opened or closed indices is automatically replicated by the cluster to ensure
2821
+ that enough shard copies are safely kept around at all times. You can open and
2822
+ close multiple indices. An error is thrown if the request explicitly refers to
2823
+ a missing index. This behavior can be turned off by using the `ignore_unavailable=true`
2824
+ parameter. By default, you must explicitly name the indices you are opening or
2825
+ closing. To open or close indices with `_all`, `*`, or other wildcard expressions,
2826
+ change the `action.destructive_requires_name` setting to `false`. This setting
2827
+ can also be changed with the cluster update settings API. Closed indices consume
2828
+ a significant amount of disk-space which can cause problems in managed environments.
2829
+ Closing indices can be turned off with the cluster settings API by setting `cluster.indices.close.enable`
2830
+ to `false`. Because opening or closing an index allocates its shards, the `wait_for_active_shards`
2831
+ setting on index creation applies to the `_open` and `_close` index actions as
2832
+ well.
2833
+
2834
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-open-close.html>`_
2610
2835
 
2611
2836
  :param index: Comma-separated list of data streams, indices, and aliases used
2612
2837
  to limit the request. Supports wildcards (`*`). By default, you must explicitly
@@ -2679,10 +2904,20 @@ class IndicesClient(NamespacedClient):
2679
2904
  pretty: t.Optional[bool] = None,
2680
2905
  ) -> ObjectApiResponse[t.Any]:
2681
2906
  """
2682
- Promotes a data stream from a replicated data stream managed by CCR to a regular
2683
- data stream
2684
-
2685
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams.html>`_
2907
+ Promote a data stream. Promote a data stream from a replicated data stream managed
2908
+ by cross-cluster replication (CCR) to a regular data stream. With CCR auto following,
2909
+ a data stream from a remote cluster can be replicated to the local cluster. These
2910
+ data streams can't be rolled over in the local cluster. These replicated data
2911
+ streams roll over only if the upstream data stream rolls over. In the event that
2912
+ the remote cluster is no longer available, the data stream in the local cluster
2913
+ can be promoted to a regular data stream, which allows these data streams to
2914
+ be rolled over in the local cluster. NOTE: When promoting a data stream, ensure
2915
+ the local cluster has a data stream enabled index template that matches the data
2916
+ stream. If this is missing, the data stream will not be able to roll over until
2917
+ a matching index template is created. This will affect the lifecycle management
2918
+ of the data stream and interfere with the data stream size and retention.
2919
+
2920
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2686
2921
 
2687
2922
  :param name: The name of the data stream
2688
2923
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -2744,7 +2979,7 @@ class IndicesClient(NamespacedClient):
2744
2979
  """
2745
2980
  Create or update an alias. Adds a data stream or index to an alias.
2746
2981
 
2747
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-aliases.html>`_
2982
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
2748
2983
 
2749
2984
  :param index: Comma-separated list of data streams or indices to add. Supports
2750
2985
  wildcards (`*`). Wildcard patterns that match both data streams and indices
@@ -2847,7 +3082,7 @@ class IndicesClient(NamespacedClient):
2847
3082
  Update data stream lifecycles. Update the data stream lifecycle of the specified
2848
3083
  data streams.
2849
3084
 
2850
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/data-streams-put-lifecycle.html>`_
3085
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-put-lifecycle.html>`_
2851
3086
 
2852
3087
  :param name: Comma-separated list of data streams used to limit the request.
2853
3088
  Supports wildcards (`*`). To target all data streams use `*` or `_all`.
@@ -2947,9 +3182,35 @@ class IndicesClient(NamespacedClient):
2947
3182
  ) -> ObjectApiResponse[t.Any]:
2948
3183
  """
2949
3184
  Create or update an index template. Index templates define settings, mappings,
2950
- and aliases that can be applied automatically to new indices.
2951
-
2952
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-put-template.html>`_
3185
+ and aliases that can be applied automatically to new indices. Elasticsearch applies
3186
+ templates to new indices based on an wildcard pattern that matches the index
3187
+ name. Index templates are applied during data stream or index creation. For data
3188
+ streams, these settings and mappings are applied when the stream's backing indices
3189
+ are created. Settings and mappings specified in a create index API request override
3190
+ any settings or mappings specified in an index template. Changes to index templates
3191
+ do not affect existing indices, including the existing backing indices of a data
3192
+ stream. You can use C-style `/* *\\/` block comments in index templates. You
3193
+ can include comments anywhere in the request body, except before the opening
3194
+ curly bracket. **Multiple matching templates** If multiple index templates match
3195
+ the name of a new index or data stream, the template with the highest priority
3196
+ is used. Multiple templates with overlapping index patterns at the same priority
3197
+ are not allowed and an error will be thrown when attempting to create a template
3198
+ matching an existing index template at identical priorities. **Composing aliases,
3199
+ mappings, and settings** When multiple component templates are specified in the
3200
+ `composed_of` field for an index template, they are merged in the order specified,
3201
+ meaning that later component templates override earlier component templates.
3202
+ Any mappings, settings, or aliases from the parent index template are merged
3203
+ in next. Finally, any configuration on the index request itself is merged. Mapping
3204
+ definitions are merged recursively, which means that later mapping components
3205
+ can introduce new field mappings and update the mapping configuration. If a field
3206
+ mapping is already contained in an earlier component, its definition will be
3207
+ completely overwritten by the later one. This recursive merging strategy applies
3208
+ not only to field mappings, but also root options like `dynamic_templates` and
3209
+ `meta`. If an earlier component contains a `dynamic_templates` block, then by
3210
+ default new `dynamic_templates` entries are appended onto the end. If an entry
3211
+ already exists with the same key, then it is overwritten by the new definition.
3212
+
3213
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-template.html>`_
2953
3214
 
2954
3215
  :param name: Index or template name
2955
3216
  :param allow_auto_create: This setting overrides the value of the `action.auto_create_index`
@@ -2977,8 +3238,11 @@ class IndicesClient(NamespacedClient):
2977
3238
  :param master_timeout: Period to wait for a connection to the master node. If
2978
3239
  no response is received before the timeout expires, the request fails and
2979
3240
  returns an error.
2980
- :param meta: Optional user metadata about the index template. May have any contents.
2981
- This map is not automatically generated by Elasticsearch.
3241
+ :param meta: Optional user metadata about the index template. It may have any
3242
+ contents. It is not automatically generated or used by Elasticsearch. This
3243
+ user-defined object is stored in the cluster state, so keeping it short is
3244
+ preferable To unset the metadata, replace the template without specifying
3245
+ it.
2982
3246
  :param priority: Priority to determine index template precedence when a new data
2983
3247
  stream or index is created. The index template with the highest priority
2984
3248
  is chosen. If no priority is specified the template is treated as though
@@ -2987,7 +3251,9 @@ class IndicesClient(NamespacedClient):
2987
3251
  :param template: Template to be applied. It may optionally include an `aliases`,
2988
3252
  `mappings`, or `settings` configuration.
2989
3253
  :param version: Version number used to manage index templates externally. This
2990
- number is not automatically generated by Elasticsearch.
3254
+ number is not automatically generated by Elasticsearch. External systems
3255
+ can use these version numbers to simplify template management. To unset a
3256
+ version, replace the template without specifying one.
2991
3257
  """
2992
3258
  if name in SKIP_IN_PATH:
2993
3259
  raise ValueError("Empty value passed for parameter 'name'")
@@ -3106,11 +3372,29 @@ class IndicesClient(NamespacedClient):
3106
3372
  body: t.Optional[t.Dict[str, t.Any]] = None,
3107
3373
  ) -> ObjectApiResponse[t.Any]:
3108
3374
  """
3109
- Update field mappings. Adds new fields to an existing data stream or index. You
3110
- can also use this API to change the search settings of existing fields. For data
3111
- streams, these changes are applied to all backing indices by default.
3112
-
3113
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-put-mapping.html>`_
3375
+ Update field mappings. Add new fields to an existing data stream or index. You
3376
+ can also use this API to change the search settings of existing fields and add
3377
+ new properties to existing object fields. For data streams, these changes are
3378
+ applied to all backing indices by default. **Add multi-fields to an existing
3379
+ field** Multi-fields let you index the same field in different ways. You can
3380
+ use this API to update the fields mapping parameter and enable multi-fields for
3381
+ an existing field. WARNING: If an index (or data stream) contains documents when
3382
+ you add a multi-field, those documents will not have values for the new multi-field.
3383
+ You can populate the new multi-field with the update by query API. **Change supported
3384
+ mapping parameters for an existing field** The documentation for each mapping
3385
+ parameter indicates whether you can update it for an existing field using this
3386
+ API. For example, you can use the update mapping API to update the `ignore_above`
3387
+ parameter. **Change the mapping of an existing field** Except for supported mapping
3388
+ parameters, you can't change the mapping or field type of an existing field.
3389
+ Changing an existing field could invalidate data that's already indexed. If you
3390
+ need to change the mapping of a field in a data stream's backing indices, refer
3391
+ to documentation about modifying data streams. If you need to change the mapping
3392
+ of a field in other indices, create a new index with the correct mapping and
3393
+ reindex your data into that index. **Rename a field** Renaming a field would
3394
+ invalidate data already indexed under the old field name. Instead, add an alias
3395
+ field to create an alternate field name.
3396
+
3397
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-mapping.html>`_
3114
3398
 
3115
3399
  :param index: A comma-separated list of index names the mapping should be added
3116
3400
  to (supports wildcards); use `_all` or omit to add the mapping on all indices.
@@ -3239,8 +3523,21 @@ class IndicesClient(NamespacedClient):
3239
3523
  """
3240
3524
  Update index settings. Changes dynamic index settings in real time. For data
3241
3525
  streams, index setting changes are applied to all backing indices by default.
3242
-
3243
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-update-settings.html>`_
3526
+ To revert a setting to the default value, use a null value. The list of per-index
3527
+ settings that can be updated dynamically on live indices can be found in index
3528
+ module documentation. To preserve existing settings from being updated, set the
3529
+ `preserve_existing` parameter to `true`. NOTE: You can only define new analyzers
3530
+ on closed indices. To add an analyzer, you must close the index, define the analyzer,
3531
+ and reopen the index. You cannot close the write index of a data stream. To update
3532
+ the analyzer for a data stream's write index and future backing indices, update
3533
+ the analyzer in the index template used by the stream. Then roll over the data
3534
+ stream to apply the new analyzer to the stream's write index and future backing
3535
+ indices. This affects searches and any new data added to the stream after the
3536
+ rollover. However, it does not affect the data stream's backing indices or their
3537
+ existing data. To change the analyzer for existing backing indices, you must
3538
+ create a new data stream and reindex your data into it.
3539
+
3540
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-update-settings.html>`_
3244
3541
 
3245
3542
  :param settings:
3246
3543
  :param index: Comma-separated list of data streams, indices, and aliases used
@@ -3343,9 +3640,25 @@ class IndicesClient(NamespacedClient):
3343
3640
  ) -> ObjectApiResponse[t.Any]:
3344
3641
  """
3345
3642
  Create or update an index template. Index templates define settings, mappings,
3346
- and aliases that can be applied automatically to new indices.
3347
-
3348
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-templates-v1.html>`_
3643
+ and aliases that can be applied automatically to new indices. Elasticsearch applies
3644
+ templates to new indices based on an index pattern that matches the index name.
3645
+ IMPORTANT: This documentation is about legacy index templates, which are deprecated
3646
+ and will be replaced by the composable templates introduced in Elasticsearch
3647
+ 7.8. Composable templates always take precedence over legacy templates. If no
3648
+ composable template matches a new index, matching legacy templates are applied
3649
+ according to their order. Index templates are only applied during index creation.
3650
+ Changes to index templates do not affect existing indices. Settings and mappings
3651
+ specified in create index API requests override any settings or mappings specified
3652
+ in an index template. You can use C-style `/* *\\/` block comments in index templates.
3653
+ You can include comments anywhere in the request body, except before the opening
3654
+ curly bracket. **Indices matching multiple templates** Multiple index templates
3655
+ can potentially match an index, in this case, both the settings and mappings
3656
+ are merged into the final configuration of the index. The order of the merging
3657
+ can be controlled using the order parameter, with lower order being applied first,
3658
+ and higher orders overriding them. NOTE: Multiple matching templates with the
3659
+ same order value will result in a non-deterministic merging order.
3660
+
3661
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-templates-v1.html>`_
3349
3662
 
3350
3663
  :param name: The name of the template
3351
3664
  :param aliases: Aliases for the index.
@@ -3364,7 +3677,8 @@ class IndicesClient(NamespacedClient):
3364
3677
  with lower values.
3365
3678
  :param settings: Configuration options for the index.
3366
3679
  :param version: Version number used to manage index templates externally. This
3367
- number is not automatically generated by Elasticsearch.
3680
+ number is not automatically generated by Elasticsearch. To unset a version,
3681
+ replace the template without specifying one.
3368
3682
  """
3369
3683
  if name in SKIP_IN_PATH:
3370
3684
  raise ValueError("Empty value passed for parameter 'name'")
@@ -3423,11 +3737,29 @@ class IndicesClient(NamespacedClient):
3423
3737
  pretty: t.Optional[bool] = None,
3424
3738
  ) -> ObjectApiResponse[t.Any]:
3425
3739
  """
3426
- Returns information about ongoing and completed shard recoveries for one or more
3427
- indices. For data streams, the API returns information for the stream’s backing
3428
- indices.
3429
-
3430
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-recovery.html>`_
3740
+ Get index recovery information. Get information about ongoing and completed shard
3741
+ recoveries for one or more indices. For data streams, the API returns information
3742
+ for the stream's backing indices. All recoveries, whether ongoing or complete,
3743
+ are kept in the cluster state and may be reported on at any time. Shard recovery
3744
+ is the process of initializing a shard copy, such as restoring a primary shard
3745
+ from a snapshot or creating a replica shard from a primary shard. When a shard
3746
+ recovery completes, the recovered shard is available for search and indexing.
3747
+ Recovery automatically occurs during the following processes: * When creating
3748
+ an index for the first time. * When a node rejoins the cluster and starts up
3749
+ any missing primary shard copies using the data that it holds in its data path.
3750
+ * Creation of new replica shard copies from the primary. * Relocation of a shard
3751
+ copy to a different node in the same cluster. * A snapshot restore operation.
3752
+ * A clone, shrink, or split operation. You can determine the cause of a shard
3753
+ recovery using the recovery or cat recovery APIs. The index recovery API reports
3754
+ information about completed recoveries only for shard copies that currently exist
3755
+ in the cluster. It only reports the last recovery for each shard copy and does
3756
+ not report historical information about earlier recoveries, nor does it report
3757
+ information about the recoveries of shard copies that no longer exist. This means
3758
+ that if a shard copy completes a recovery and then Elasticsearch relocates it
3759
+ onto a different node then the information about the original recovery will not
3760
+ be shown in the recovery API.
3761
+
3762
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-recovery.html>`_
3431
3763
 
3432
3764
  :param index: Comma-separated list of data streams, indices, and aliases used
3433
3765
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3489,9 +3821,19 @@ class IndicesClient(NamespacedClient):
3489
3821
  """
3490
3822
  Refresh an index. A refresh makes recent operations performed on one or more
3491
3823
  indices available for search. For data streams, the API runs the refresh operation
3492
- on the stream’s backing indices.
3493
-
3494
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-refresh.html>`_
3824
+ on the stream’s backing indices. By default, Elasticsearch periodically refreshes
3825
+ indices every second, but only on indices that have received one search request
3826
+ or more in the last 30 seconds. You can change this default interval with the
3827
+ `index.refresh_interval` setting. Refresh requests are synchronous and do not
3828
+ return a response until the refresh operation completes. Refreshes are resource-intensive.
3829
+ To ensure good cluster performance, it's recommended to wait for Elasticsearch's
3830
+ periodic refresh rather than performing an explicit refresh when possible. If
3831
+ your application workflow indexes documents and then runs a search to retrieve
3832
+ the indexed document, it's recommended to use the index API's `refresh=wait_for`
3833
+ query parameter option. This option ensures the indexing operation waits for
3834
+ a periodic refresh before running the search.
3835
+
3836
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-refresh.html>`_
3495
3837
 
3496
3838
  :param index: Comma-separated list of data streams, indices, and aliases used
3497
3839
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3559,9 +3901,23 @@ class IndicesClient(NamespacedClient):
3559
3901
  pretty: t.Optional[bool] = None,
3560
3902
  ) -> ObjectApiResponse[t.Any]:
3561
3903
  """
3562
- Reloads an index's search analyzers and their resources.
3563
-
3564
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-reload-analyzers.html>`_
3904
+ Reload search analyzers. Reload an index's search analyzers and their resources.
3905
+ For data streams, the API reloads search analyzers and resources for the stream's
3906
+ backing indices. IMPORTANT: After reloading the search analyzers you should clear
3907
+ the request cache to make sure it doesn't contain responses derived from the
3908
+ previous versions of the analyzer. You can use the reload search analyzers API
3909
+ to pick up changes to synonym files used in the `synonym_graph` or `synonym`
3910
+ token filter of a search analyzer. To be eligible, the token filter must have
3911
+ an `updateable` flag of `true` and only be used in search analyzers. NOTE: This
3912
+ API does not perform a reload for each shard of an index. Instead, it performs
3913
+ a reload for each node containing index shards. As a result, the total shard
3914
+ count returned by the API can differ from the number of index shards. Because
3915
+ reloading affects every node with an index shard, it is important to update the
3916
+ synonym file on every data node in the cluster--including nodes that don't contain
3917
+ a shard replica--before using this API. This ensures the synonym file is updated
3918
+ everywhere in the cluster in case shards are relocated in the future.
3919
+
3920
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-reload-analyzers.html>`_
3565
3921
 
3566
3922
  :param index: A comma-separated list of index names to reload analyzers for
3567
3923
  :param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
@@ -3623,11 +3979,40 @@ class IndicesClient(NamespacedClient):
3623
3979
  pretty: t.Optional[bool] = None,
3624
3980
  ) -> ObjectApiResponse[t.Any]:
3625
3981
  """
3626
- Resolves the specified index expressions to return information about each cluster,
3627
- including the local cluster, if included. Multiple patterns and remote clusters
3628
- are supported.
3629
-
3630
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-resolve-cluster-api.html>`_
3982
+ Resolve the cluster. Resolve the specified index expressions to return information
3983
+ about each cluster, including the local cluster, if included. Multiple patterns
3984
+ and remote clusters are supported. This endpoint is useful before doing a cross-cluster
3985
+ search in order to determine which remote clusters should be included in a search.
3986
+ You use the same index expression with this endpoint as you would for cross-cluster
3987
+ search. Index and cluster exclusions are also supported with this endpoint. For
3988
+ each cluster in the index expression, information is returned about: * Whether
3989
+ the querying ("local") cluster is currently connected to each remote cluster
3990
+ in the index expression scope. * Whether each remote cluster is configured with
3991
+ `skip_unavailable` as `true` or `false`. * Whether there are any indices, aliases,
3992
+ or data streams on that cluster that match the index expression. * Whether the
3993
+ search is likely to have errors returned when you do the cross-cluster search
3994
+ (including any authorization errors if you do not have permission to query the
3995
+ index). * Cluster version information, including the Elasticsearch server version.
3996
+ For example, `GET /_resolve/cluster/my-index-*,cluster*:my-index-*` returns information
3997
+ about the local cluster and all remotely configured clusters that start with
3998
+ the alias `cluster*`. Each cluster returns information about whether it has any
3999
+ indices, aliases or data streams that match `my-index-*`. **Advantages of using
4000
+ this endpoint before a cross-cluster search** You may want to exclude a cluster
4001
+ or index from a search when: * A remote cluster is not currently connected and
4002
+ is configured with `skip_unavailable=false`. Running a cross-cluster search under
4003
+ those conditions will cause the entire search to fail. * A cluster has no matching
4004
+ indices, aliases or data streams for the index expression (or your user does
4005
+ not have permissions to search them). For example, suppose your index expression
4006
+ is `logs*,remote1:logs*` and the remote1 cluster has no indices, aliases or data
4007
+ streams that match `logs*`. In that case, that cluster will return no results
4008
+ from that cluster if you include it in a cross-cluster search. * The index expression
4009
+ (combined with any query parameters you specify) will likely cause an exception
4010
+ to be thrown when you do the search. In these cases, the "error" field in the
4011
+ `_resolve/cluster` response will be present. (This is also where security/permission
4012
+ errors will be shown.) * A remote cluster is an older version that does not support
4013
+ the feature you want to use in your search.
4014
+
4015
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-cluster-api.html>`_
3631
4016
 
3632
4017
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3633
4018
  and data streams to resolve. Resources on remote clusters can be specified
@@ -3698,10 +4083,10 @@ class IndicesClient(NamespacedClient):
3698
4083
  pretty: t.Optional[bool] = None,
3699
4084
  ) -> ObjectApiResponse[t.Any]:
3700
4085
  """
3701
- Resolves the specified name(s) and/or index patterns for indices, aliases, and
3702
- data streams. Multiple patterns and remote clusters are supported.
4086
+ Resolve indices. Resolve the names and/or index patterns for indices, aliases,
4087
+ and data streams. Multiple patterns and remote clusters are supported.
3703
4088
 
3704
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-resolve-index-api.html>`_
4089
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-index-api.html>`_
3705
4090
 
3706
4091
  :param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
3707
4092
  and data streams to resolve. Resources on remote clusters can be specified
@@ -3772,9 +4157,35 @@ class IndicesClient(NamespacedClient):
3772
4157
  body: t.Optional[t.Dict[str, t.Any]] = None,
3773
4158
  ) -> ObjectApiResponse[t.Any]:
3774
4159
  """
3775
- Roll over to a new index. Creates a new index for a data stream or index alias.
3776
-
3777
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-rollover-index.html>`_
4160
+ Roll over to a new index. TIP: It is recommended to use the index lifecycle rollover
4161
+ action to automate rollovers. The rollover API creates a new index for a data
4162
+ stream or index alias. The API behavior depends on the rollover target. **Roll
4163
+ over a data stream** If you roll over a data stream, the API creates a new write
4164
+ index for the stream. The stream's previous write index becomes a regular backing
4165
+ index. A rollover also increments the data stream's generation. **Roll over an
4166
+ index alias with a write index** TIP: Prior to Elasticsearch 7.9, you'd typically
4167
+ use an index alias with a write index to manage time series data. Data streams
4168
+ replace this functionality, require less maintenance, and automatically integrate
4169
+ with data tiers. If an index alias points to multiple indices, one of the indices
4170
+ must be a write index. The rollover API creates a new write index for the alias
4171
+ with `is_write_index` set to `true`. The API also `sets is_write_index` to `false`
4172
+ for the previous write index. **Roll over an index alias with one index** If
4173
+ you roll over an index alias that points to only one index, the API creates a
4174
+ new index for the alias and removes the original index from the alias. NOTE:
4175
+ A rollover creates a new index and is subject to the `wait_for_active_shards`
4176
+ setting. **Increment index names for an alias** When you roll over an index alias,
4177
+ you can specify a name for the new index. If you don't specify a name and the
4178
+ current index ends with `-` and a number, such as `my-index-000001` or `my-index-3`,
4179
+ the new index name increments that number. For example, if you roll over an alias
4180
+ with a current index of `my-index-000001`, the rollover creates a new index named
4181
+ `my-index-000002`. This number is always six characters and zero-padded, regardless
4182
+ of the previous index's name. If you use an index alias for time series data,
4183
+ you can use date math in the index name to track the rollover date. For example,
4184
+ you can create an alias that points to an index named `<my-index-{now/d}-000001>`.
4185
+ If you create the index on May 6, 2099, the index's name is `my-index-2099.05.06-000001`.
4186
+ If you roll over the alias on May 7, 2099, the new index's name is `my-index-2099.05.07-000002`.
4187
+
4188
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-rollover-index.html>`_
3778
4189
 
3779
4190
  :param alias: Name of the data stream or index alias to roll over.
3780
4191
  :param new_index: Name of the index to create. Supports date math. Data streams
@@ -3877,10 +4288,11 @@ class IndicesClient(NamespacedClient):
3877
4288
  verbose: t.Optional[bool] = None,
3878
4289
  ) -> ObjectApiResponse[t.Any]:
3879
4290
  """
3880
- Returns low-level information about the Lucene segments in index shards. For
3881
- data streams, the API returns information about the streams backing indices.
4291
+ Get index segments. Get low-level information about the Lucene segments in index
4292
+ shards. For data streams, the API returns information about the stream's backing
4293
+ indices.
3882
4294
 
3883
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-segments.html>`_
4295
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-segments.html>`_
3884
4296
 
3885
4297
  :param index: Comma-separated list of data streams, indices, and aliases used
3886
4298
  to limit the request. Supports wildcards (`*`). To target all data streams
@@ -3957,10 +4369,16 @@ class IndicesClient(NamespacedClient):
3957
4369
  ] = None,
3958
4370
  ) -> ObjectApiResponse[t.Any]:
3959
4371
  """
3960
- Retrieves store information about replica shards in one or more indices. For
3961
- data streams, the API retrieves store information for the streams backing indices.
4372
+ Get index shard stores. Get store information about replica shards in one or
4373
+ more indices. For data streams, the API retrieves store information for the stream's
4374
+ backing indices. The index shard stores API returns the following information:
4375
+ * The node on which each replica shard exists. * The allocation ID for each replica
4376
+ shard. * A unique ID for each replica shard. * Any errors encountered while opening
4377
+ the shard index or from an earlier failure. By default, the API returns store
4378
+ information only for primary shards that are unassigned or have one or more unassigned
4379
+ replica shards.
3962
4380
 
3963
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-shards-stores.html>`_
4381
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shards-stores.html>`_
3964
4382
 
3965
4383
  :param index: List of data streams, indices, and aliases used to limit the request.
3966
4384
  :param allow_no_indices: If false, the request returns an error if any wildcard
@@ -4029,9 +4447,41 @@ class IndicesClient(NamespacedClient):
4029
4447
  body: t.Optional[t.Dict[str, t.Any]] = None,
4030
4448
  ) -> ObjectApiResponse[t.Any]:
4031
4449
  """
4032
- Shrinks an existing index into a new index with fewer primary shards.
4033
-
4034
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-shrink-index.html>`_
4450
+ Shrink an index. Shrink an index into a new index with fewer primary shards.
4451
+ Before you can shrink an index: * The index must be read-only. * A copy of every
4452
+ shard in the index must reside on the same node. * The index must have a green
4453
+ health status. To make shard allocation easier, we recommend you also remove
4454
+ the index's replica shards. You can later re-add replica shards as part of the
4455
+ shrink operation. The requested number of primary shards in the target index
4456
+ must be a factor of the number of shards in the source index. For example an
4457
+ index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an
4458
+ index with 15 primary shards can be shrunk into 5, 3 or 1. If the number of shards
4459
+ in the index is a prime number it can only be shrunk into a single primary shard
4460
+ Before shrinking, a (primary or replica) copy of every shard in the index must
4461
+ be present on the same node. The current write index on a data stream cannot
4462
+ be shrunk. In order to shrink the current write index, the data stream must first
4463
+ be rolled over so that a new write index is created and then the previous write
4464
+ index can be shrunk. A shrink operation: * Creates a new target index with the
4465
+ same definition as the source index, but with a smaller number of primary shards.
4466
+ * Hard-links segments from the source index into the target index. If the file
4467
+ system does not support hard-linking, then all segments are copied into the new
4468
+ index, which is a much more time consuming process. Also if using multiple data
4469
+ paths, shards on different data paths require a full copy of segment files if
4470
+ they are not on the same disk since hardlinks do not work across disks. * Recovers
4471
+ the target index as though it were a closed index which had just been re-opened.
4472
+ Recovers shards to the `.routing.allocation.initial_recovery._id` index setting.
4473
+ IMPORTANT: Indices can only be shrunk if they satisfy the following requirements:
4474
+ * The target index must not exist. * The source index must have more primary
4475
+ shards than the target index. * The number of primary shards in the target index
4476
+ must be a factor of the number of primary shards in the source index. The source
4477
+ index must have more primary shards than the target index. * The index must not
4478
+ contain more than 2,147,483,519 documents in total across all shards that will
4479
+ be shrunk into a single shard on the target index as this is the maximum number
4480
+ of docs that can fit into a single shard. * The node handling the shrink process
4481
+ must have sufficient free disk space to accommodate a second copy of the existing
4482
+ index.
4483
+
4484
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shrink-index.html>`_
4035
4485
 
4036
4486
  :param index: Name of the source index to shrink.
4037
4487
  :param target: Name of the target index to create.
@@ -4104,10 +4554,10 @@ class IndicesClient(NamespacedClient):
4104
4554
  pretty: t.Optional[bool] = None,
4105
4555
  ) -> ObjectApiResponse[t.Any]:
4106
4556
  """
4107
- Simulate an index. Returns the index configuration that would be applied to the
4108
- specified index from an existing index template.
4557
+ Simulate an index. Get the index configuration that would be applied to the specified
4558
+ index from an existing index template.
4109
4559
 
4110
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-simulate-index.html>`_
4560
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-index.html>`_
4111
4561
 
4112
4562
  :param name: Name of the index to simulate
4113
4563
  :param include_defaults: If true, returns all relevant default configurations
@@ -4182,10 +4632,10 @@ class IndicesClient(NamespacedClient):
4182
4632
  body: t.Optional[t.Dict[str, t.Any]] = None,
4183
4633
  ) -> ObjectApiResponse[t.Any]:
4184
4634
  """
4185
- Simulate an index template. Returns the index configuration that would be applied
4635
+ Simulate an index template. Get the index configuration that would be applied
4186
4636
  by a particular index template.
4187
4637
 
4188
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-simulate-template.html>`_
4638
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-template.html>`_
4189
4639
 
4190
4640
  :param name: Name of the index template to simulate. To test a template configuration
4191
4641
  before you add it to the cluster, omit this parameter and specify the template
@@ -4314,9 +4764,33 @@ class IndicesClient(NamespacedClient):
4314
4764
  body: t.Optional[t.Dict[str, t.Any]] = None,
4315
4765
  ) -> ObjectApiResponse[t.Any]:
4316
4766
  """
4317
- Splits an existing index into a new index with more primary shards.
4318
-
4319
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-split-index.html>`_
4767
+ Split an index. Split an index into a new index with more primary shards. * Before
4768
+ you can split an index: * The index must be read-only. * The cluster health status
4769
+ must be green. You can do make an index read-only with the following request
4770
+ using the add index block API: ``` PUT /my_source_index/_block/write ``` The
4771
+ current write index on a data stream cannot be split. In order to split the current
4772
+ write index, the data stream must first be rolled over so that a new write index
4773
+ is created and then the previous write index can be split. The number of times
4774
+ the index can be split (and the number of shards that each original shard can
4775
+ be split into) is determined by the `index.number_of_routing_shards` setting.
4776
+ The number of routing shards specifies the hashing space that is used internally
4777
+ to distribute documents across shards with consistent hashing. For instance,
4778
+ a 5 shard index with `number_of_routing_shards` set to 30 (5 x 2 x 3) could be
4779
+ split by a factor of 2 or 3. A split operation: * Creates a new target index
4780
+ with the same definition as the source index, but with a larger number of primary
4781
+ shards. * Hard-links segments from the source index into the target index. If
4782
+ the file system doesn't support hard-linking, all segments are copied into the
4783
+ new index, which is a much more time consuming process. * Hashes all documents
4784
+ again, after low level files are created, to delete documents that belong to
4785
+ a different shard. * Recovers the target index as though it were a closed index
4786
+ which had just been re-opened. IMPORTANT: Indices can only be split if they satisfy
4787
+ the following requirements: * The target index must not exist. * The source index
4788
+ must have fewer primary shards than the target index. * The number of primary
4789
+ shards in the target index must be a multiple of the number of primary shards
4790
+ in the source index. * The node handling the split process must have sufficient
4791
+ free disk space to accommodate a second copy of the existing index.
4792
+
4793
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-split-index.html>`_
4320
4794
 
4321
4795
  :param index: Name of the source index to split.
4322
4796
  :param target: Name of the target index to create.
@@ -4406,10 +4880,16 @@ class IndicesClient(NamespacedClient):
4406
4880
  pretty: t.Optional[bool] = None,
4407
4881
  ) -> ObjectApiResponse[t.Any]:
4408
4882
  """
4409
- Returns statistics for one or more indices. For data streams, the API retrieves
4410
- statistics for the streams backing indices.
4883
+ Get index statistics. For data streams, the API retrieves statistics for the
4884
+ stream's backing indices. By default, the returned statistics are index-level
4885
+ with `primaries` and `total` aggregations. `primaries` are the values for only
4886
+ the primary shards. `total` are the accumulated values for both primary and replica
4887
+ shards. To get shard-level statistics, set the `level` parameter to `shards`.
4888
+ NOTE: When moving to another node, the shard-level statistics for a shard are
4889
+ cleared. Although the shard is no longer part of the node, that node retains
4890
+ any node-level statistics to which the shard contributed.
4411
4891
 
4412
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-stats.html>`_
4892
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-stats.html>`_
4413
4893
 
4414
4894
  :param index: A comma-separated list of index names; use `_all` or empty string
4415
4895
  to perform the operation on all indices
@@ -4510,9 +4990,10 @@ class IndicesClient(NamespacedClient):
4510
4990
  wait_for_active_shards: t.Optional[str] = None,
4511
4991
  ) -> ObjectApiResponse[t.Any]:
4512
4992
  """
4513
- Unfreezes an index.
4993
+ Unfreeze an index. When a frozen index is unfrozen, the index goes through the
4994
+ normal recovery process and becomes writeable again.
4514
4995
 
4515
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/unfreeze-index-api.html>`_
4996
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/unfreeze-index-api.html>`_
4516
4997
 
4517
4998
  :param index: Identifier for the index.
4518
4999
  :param allow_no_indices: If `false`, the request returns an error if any wildcard
@@ -4586,7 +5067,7 @@ class IndicesClient(NamespacedClient):
4586
5067
  """
4587
5068
  Create or update an alias. Adds a data stream or index to an alias.
4588
5069
 
4589
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-aliases.html>`_
5070
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
4590
5071
 
4591
5072
  :param actions: Actions to perform.
4592
5073
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -4661,7 +5142,7 @@ class IndicesClient(NamespacedClient):
4661
5142
  """
4662
5143
  Validate a query. Validates a query without running it.
4663
5144
 
4664
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-validate.html>`_
5145
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-validate.html>`_
4665
5146
 
4666
5147
  :param index: Comma-separated list of data streams, indices, and aliases to search.
4667
5148
  Supports wildcards (`*`). To search all data streams or indices, omit this