elasticsearch 8.17.1__py3-none-any.whl → 8.17.2__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 (95) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +1971 -779
  3. elasticsearch/_async/client/async_search.py +33 -22
  4. elasticsearch/_async/client/autoscaling.py +27 -21
  5. elasticsearch/_async/client/cat.py +216 -141
  6. elasticsearch/_async/client/ccr.py +96 -70
  7. elasticsearch/_async/client/cluster.py +150 -142
  8. elasticsearch/_async/client/connector.py +182 -86
  9. elasticsearch/_async/client/dangling_indices.py +19 -13
  10. elasticsearch/_async/client/enrich.py +25 -6
  11. elasticsearch/_async/client/eql.py +22 -9
  12. elasticsearch/_async/client/esql.py +295 -3
  13. elasticsearch/_async/client/features.py +25 -25
  14. elasticsearch/_async/client/fleet.py +15 -9
  15. elasticsearch/_async/client/graph.py +9 -8
  16. elasticsearch/_async/client/ilm.py +85 -55
  17. elasticsearch/_async/client/indices.py +692 -549
  18. elasticsearch/_async/client/inference.py +32 -28
  19. elasticsearch/_async/client/ingest.py +61 -22
  20. elasticsearch/_async/client/license.py +48 -31
  21. elasticsearch/_async/client/logstash.py +17 -6
  22. elasticsearch/_async/client/migration.py +23 -14
  23. elasticsearch/_async/client/ml.py +532 -284
  24. elasticsearch/_async/client/monitoring.py +5 -2
  25. elasticsearch/_async/client/nodes.py +43 -27
  26. elasticsearch/_async/client/query_rules.py +51 -25
  27. elasticsearch/_async/client/rollup.py +111 -73
  28. elasticsearch/_async/client/search_application.py +49 -21
  29. elasticsearch/_async/client/searchable_snapshots.py +21 -8
  30. elasticsearch/_async/client/security.py +810 -472
  31. elasticsearch/_async/client/shutdown.py +31 -26
  32. elasticsearch/_async/client/simulate.py +16 -22
  33. elasticsearch/_async/client/slm.py +55 -30
  34. elasticsearch/_async/client/snapshot.py +173 -192
  35. elasticsearch/_async/client/sql.py +37 -16
  36. elasticsearch/_async/client/ssl.py +16 -17
  37. elasticsearch/_async/client/synonyms.py +50 -29
  38. elasticsearch/_async/client/tasks.py +74 -39
  39. elasticsearch/_async/client/text_structure.py +61 -52
  40. elasticsearch/_async/client/transform.py +108 -79
  41. elasticsearch/_async/client/watcher.py +93 -57
  42. elasticsearch/_async/client/xpack.py +16 -7
  43. elasticsearch/_async/helpers.py +1 -1
  44. elasticsearch/_sync/client/__init__.py +1971 -779
  45. elasticsearch/_sync/client/async_search.py +33 -22
  46. elasticsearch/_sync/client/autoscaling.py +27 -21
  47. elasticsearch/_sync/client/cat.py +216 -141
  48. elasticsearch/_sync/client/ccr.py +96 -70
  49. elasticsearch/_sync/client/cluster.py +150 -142
  50. elasticsearch/_sync/client/connector.py +182 -86
  51. elasticsearch/_sync/client/dangling_indices.py +19 -13
  52. elasticsearch/_sync/client/enrich.py +25 -6
  53. elasticsearch/_sync/client/eql.py +22 -9
  54. elasticsearch/_sync/client/esql.py +295 -3
  55. elasticsearch/_sync/client/features.py +25 -25
  56. elasticsearch/_sync/client/fleet.py +15 -9
  57. elasticsearch/_sync/client/graph.py +9 -8
  58. elasticsearch/_sync/client/ilm.py +85 -55
  59. elasticsearch/_sync/client/indices.py +692 -549
  60. elasticsearch/_sync/client/inference.py +32 -28
  61. elasticsearch/_sync/client/ingest.py +61 -22
  62. elasticsearch/_sync/client/license.py +48 -31
  63. elasticsearch/_sync/client/logstash.py +17 -6
  64. elasticsearch/_sync/client/migration.py +23 -14
  65. elasticsearch/_sync/client/ml.py +532 -284
  66. elasticsearch/_sync/client/monitoring.py +5 -2
  67. elasticsearch/_sync/client/nodes.py +43 -27
  68. elasticsearch/_sync/client/query_rules.py +51 -25
  69. elasticsearch/_sync/client/rollup.py +111 -73
  70. elasticsearch/_sync/client/search_application.py +49 -21
  71. elasticsearch/_sync/client/searchable_snapshots.py +21 -8
  72. elasticsearch/_sync/client/security.py +810 -472
  73. elasticsearch/_sync/client/shutdown.py +31 -26
  74. elasticsearch/_sync/client/simulate.py +16 -22
  75. elasticsearch/_sync/client/slm.py +55 -30
  76. elasticsearch/_sync/client/snapshot.py +173 -192
  77. elasticsearch/_sync/client/sql.py +37 -16
  78. elasticsearch/_sync/client/ssl.py +16 -17
  79. elasticsearch/_sync/client/synonyms.py +50 -29
  80. elasticsearch/_sync/client/tasks.py +74 -39
  81. elasticsearch/_sync/client/text_structure.py +61 -52
  82. elasticsearch/_sync/client/transform.py +108 -79
  83. elasticsearch/_sync/client/utils.py +1 -1
  84. elasticsearch/_sync/client/watcher.py +93 -57
  85. elasticsearch/_sync/client/xpack.py +16 -7
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/client.py +2 -0
  88. elasticsearch/helpers/actions.py +1 -1
  89. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  90. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
  91. elasticsearch-8.17.2.dist-info/RECORD +119 -0
  92. elasticsearch-8.17.1.dist-info/RECORD +0 -119
  93. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
  94. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
@@ -55,8 +55,11 @@ class IndicesClient(NamespacedClient):
55
55
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
56
56
  ) -> ObjectApiResponse[t.Any]:
57
57
  """
58
- Add an index block. Limits the operations allowed on an index by blocking specific
59
- operation types.
58
+ .. raw:: html
59
+
60
+ <p>Add an index block.
61
+ Limits the operations allowed on an index by blocking specific operation types.</p>
62
+
60
63
 
61
64
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-modules-blocks.html>`_
62
65
 
@@ -143,12 +146,15 @@ class IndicesClient(NamespacedClient):
143
146
  body: t.Optional[t.Dict[str, t.Any]] = None,
144
147
  ) -> ObjectApiResponse[t.Any]:
145
148
  """
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.
149
+ .. raw:: html
150
+
151
+ <p>Get tokens from text analysis.
152
+ The analyze API performs analysis on a text string and returns the resulting tokens.</p>
153
+ <p>Generating excessive amount of tokens may cause a node to run out of memory.
154
+ The <code>index.analyze.max_token_count</code> setting enables you to limit the number of tokens that can be produced.
155
+ If more than this limit of tokens gets generated, an error occurs.
156
+ The <code>_analyze</code> endpoint without a specified index will always use <code>10000</code> as its limit.</p>
157
+
152
158
 
153
159
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-analyze.html>`_
154
160
 
@@ -249,11 +255,15 @@ class IndicesClient(NamespacedClient):
249
255
  request: t.Optional[bool] = None,
250
256
  ) -> ObjectApiResponse[t.Any]:
251
257
  """
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.
258
+ .. raw:: html
259
+
260
+ <p>Clear the cache.
261
+ Clear the cache of one or more indices.
262
+ For data streams, the API clears the caches of the stream's backing indices.</p>
263
+ <p>By default, the clear cache API clears all caches.
264
+ To clear only specific caches, use the <code>fielddata</code>, <code>query</code>, or <code>request</code> parameters.
265
+ To clear the cache only of specific fields, use the <code>fields</code> parameter.</p>
266
+
257
267
 
258
268
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clearcache.html>`_
259
269
 
@@ -338,44 +348,44 @@ class IndicesClient(NamespacedClient):
338
348
  body: t.Optional[t.Dict[str, t.Any]] = None,
339
349
  ) -> ObjectApiResponse[t.Any]:
340
350
  """
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.
351
+ .. raw:: html
352
+
353
+ <p>Clone an index.
354
+ Clone an existing index into a new index.
355
+ Each original primary shard is cloned into a new primary shard in the new index.</p>
356
+ <p>IMPORTANT: Elasticsearch does not apply index templates to the resulting index.
357
+ The API also does not copy index metadata from the original index.
358
+ Index metadata includes aliases, index lifecycle management phase definitions, and cross-cluster replication (CCR) follower information.
359
+ For example, if you clone a CCR follower index, the resulting clone will not be a follower index.</p>
360
+ <p>The clone API copies most index settings from the source index to the resulting index, with the exception of <code>index.number_of_replicas</code> and <code>index.auto_expand_replicas</code>.
361
+ To set the number of replicas in the resulting index, configure these settings in the clone request.</p>
362
+ <p>Cloning works as follows:</p>
363
+ <ul>
364
+ <li>First, it creates a new target index with the same definition as the source index.</li>
365
+ <li>Then it hard-links segments from the source index into the target index. If the file system does not support hard-linking, all segments are copied into the new index, which is a much more time consuming process.</li>
366
+ <li>Finally, it recovers the target index as though it were a closed index which had just been re-opened.</li>
367
+ </ul>
368
+ <p>IMPORTANT: Indices can only be cloned if they meet the following requirements:</p>
369
+ <ul>
370
+ <li>The index must be marked as read-only and have a cluster health status of green.</li>
371
+ <li>The target index must not exist.</li>
372
+ <li>The source index must have the same number of primary shards as the target index.</li>
373
+ <li>The node handling the clone process must have sufficient free disk space to accommodate a second copy of the existing index.</li>
374
+ </ul>
375
+ <p>The current write index on a data stream cannot be cloned.
376
+ In order to clone the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be cloned.</p>
377
+ <p>NOTE: Mappings cannot be specified in the <code>_clone</code> request. The mappings of the source index will be used for the target index.</p>
378
+ <p><strong>Monitor the cloning process</strong></p>
379
+ <p>The cloning process can be monitored with the cat recovery API or the cluster health API can be used to wait until all primary shards have been allocated by setting the <code>wait_for_status</code> parameter to <code>yellow</code>.</p>
380
+ <p>The <code>_clone</code> API returns as soon as the target index has been added to the cluster state, before any shards have been allocated.
381
+ At this point, all shards are in the state unassigned.
382
+ If, for any reason, the target index can't be allocated, its primary shard will remain unassigned until it can be allocated on that node.</p>
383
+ <p>Once the primary shard is allocated, it moves to state initializing, and the clone process begins.
384
+ When the clone operation completes, the shard will become active.
385
+ At that point, Elasticsearch will try to allocate any replicas and may decide to relocate the primary shard to another node.</p>
386
+ <p><strong>Wait for active shards</strong></p>
387
+ <p>Because the clone operation creates a new index to clone the shards to, the wait for active shards setting on index creation applies to the clone index action as well.</p>
388
+
379
389
 
380
390
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-clone-index.html>`_
381
391
 
@@ -463,24 +473,23 @@ class IndicesClient(NamespacedClient):
463
473
  ] = None,
464
474
  ) -> ObjectApiResponse[t.Any]:
465
475
  """
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`.
476
+ .. raw:: html
477
+
478
+ <p>Close an index.
479
+ A closed index is blocked for read or write operations and does not allow all operations that opened indices allow.
480
+ It is not possible to index documents or to search for documents in a closed index.
481
+ 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>
482
+ <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.
483
+ The shards will then go through the normal recovery process.
484
+ The data of opened and closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.</p>
485
+ <p>You can open and close multiple indices.
486
+ An error is thrown if the request explicitly refers to a missing index.
487
+ This behaviour can be turned off using the <code>ignore_unavailable=true</code> parameter.</p>
488
+ <p>By default, you must explicitly name the indices you are opening or closing.
489
+ To open or close indices with <code>_all</code>, <code>*</code>, or other wildcard expressions, change the<code> action.destructive_requires_name</code> setting to <code>false</code>. This setting can also be changed with the cluster update settings API.</p>
490
+ <p>Closed indices consume a significant amount of disk-space which can cause problems in managed environments.
491
+ Closing indices can be turned off with the cluster settings API by setting <code>cluster.indices.close.enable</code> to <code>false</code>.</p>
492
+
484
493
 
485
494
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-close.html>`_
486
495
 
@@ -561,26 +570,27 @@ class IndicesClient(NamespacedClient):
561
570
  body: t.Optional[t.Dict[str, t.Any]] = None,
562
571
  ) -> ObjectApiResponse[t.Any]:
563
572
  """
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.
573
+ .. raw:: html
574
+
575
+ <p>Create an index.
576
+ You can use the create index API to add a new index to an Elasticsearch cluster.
577
+ When creating an index, you can specify the following:</p>
578
+ <ul>
579
+ <li>Settings for the index.</li>
580
+ <li>Mappings for fields in the index.</li>
581
+ <li>Index aliases</li>
582
+ </ul>
583
+ <p><strong>Wait for active shards</strong></p>
584
+ <p>By default, index creation will only return a response to the client when the primary copies of each shard have been started, or the request times out.
585
+ The index creation response will indicate what happened.
586
+ For example, <code>acknowledged</code> indicates whether the index was successfully created in the cluster, <code>while shards_acknowledged</code> indicates whether the requisite number of shard copies were started for each shard in the index before timing out.
587
+ Note that it is still possible for either <code>acknowledged</code> or <code>shards_acknowledged</code> to be <code>false</code>, but for the index creation to be successful.
588
+ These values simply indicate whether the operation completed before the timeout.
589
+ If <code>acknowledged</code> is false, the request timed out before the cluster state was updated with the newly created index, but it probably will be created sometime soon.
590
+ If <code>shards_acknowledged</code> is false, then the request timed out before the requisite number of shards were started (by default just the primaries), even if the cluster state was successfully updated to reflect the newly created index (that is to say, <code>acknowledged</code> is <code>true</code>).</p>
591
+ <p>You can change the default of only waiting for the primary shards to start through the index setting <code>index.write.wait_for_active_shards</code>.
592
+ Note that changing this setting will also affect the <code>wait_for_active_shards</code> value on all subsequent write operations.</p>
593
+
584
594
 
585
595
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-create-index.html>`_
586
596
 
@@ -653,8 +663,12 @@ class IndicesClient(NamespacedClient):
653
663
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
654
664
  ) -> ObjectApiResponse[t.Any]:
655
665
  """
656
- Create a data stream. Creates a data stream. You must have a matching index template
657
- with data stream enabled.
666
+ .. raw:: html
667
+
668
+ <p>Create a data stream.
669
+ Creates a data stream.
670
+ You must have a matching index template with data stream enabled.</p>
671
+
658
672
 
659
673
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
660
674
 
@@ -715,7 +729,11 @@ class IndicesClient(NamespacedClient):
715
729
  pretty: t.Optional[bool] = None,
716
730
  ) -> ObjectApiResponse[t.Any]:
717
731
  """
718
- Get data stream stats. Retrieves statistics for one or more data streams.
732
+ .. raw:: html
733
+
734
+ <p>Get data stream stats.
735
+ Retrieves statistics for one or more data streams.</p>
736
+
719
737
 
720
738
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
721
739
 
@@ -776,11 +794,15 @@ class IndicesClient(NamespacedClient):
776
794
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
777
795
  ) -> ObjectApiResponse[t.Any]:
778
796
  """
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.
797
+ .. raw:: html
798
+
799
+ <p>Delete indices.
800
+ Deleting an index deletes its documents, shards, and metadata.
801
+ It does not delete related Kibana components, such as data views, visualizations, or dashboards.</p>
802
+ <p>You cannot delete the current write index of a data stream.
803
+ To delete the index, you must roll over the data stream so a new write index is created.
804
+ You can then use the delete index API to delete the previous write index.</p>
805
+
784
806
 
785
807
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-index.html>`_
786
808
 
@@ -850,7 +872,11 @@ class IndicesClient(NamespacedClient):
850
872
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
851
873
  ) -> ObjectApiResponse[t.Any]:
852
874
  """
853
- Delete an alias. Removes a data stream or index from an alias.
875
+ .. raw:: html
876
+
877
+ <p>Delete an alias.
878
+ Removes a data stream or index from an alias.</p>
879
+
854
880
 
855
881
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-alias.html>`_
856
882
 
@@ -914,8 +940,11 @@ class IndicesClient(NamespacedClient):
914
940
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
915
941
  ) -> ObjectApiResponse[t.Any]:
916
942
  """
917
- Delete data stream lifecycles. Removes the data stream lifecycle from a data
918
- stream, rendering it not managed by the data stream lifecycle.
943
+ .. raw:: html
944
+
945
+ <p>Delete data stream lifecycles.
946
+ Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.</p>
947
+
919
948
 
920
949
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-delete-lifecycle.html>`_
921
950
 
@@ -975,7 +1004,11 @@ class IndicesClient(NamespacedClient):
975
1004
  pretty: t.Optional[bool] = None,
976
1005
  ) -> ObjectApiResponse[t.Any]:
977
1006
  """
978
- Delete data streams. Deletes one or more data streams and their backing indices.
1007
+ .. raw:: html
1008
+
1009
+ <p>Delete data streams.
1010
+ Deletes one or more data streams and their backing indices.</p>
1011
+
979
1012
 
980
1013
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
981
1014
 
@@ -1027,10 +1060,13 @@ class IndicesClient(NamespacedClient):
1027
1060
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1028
1061
  ) -> ObjectApiResponse[t.Any]:
1029
1062
  """
1030
- Delete an index template. The provided <index-template> may contain multiple
1031
- template names separated by a comma. If multiple template names are specified
1032
- then there is no wildcard support and the provided names should match completely
1033
- with existing templates.
1063
+ .. raw:: html
1064
+
1065
+ <p>Delete an index template.
1066
+ The provided <!-- raw HTML omitted --> may contain multiple template names separated by a comma. If multiple template
1067
+ names are specified then there is no wildcard support and the provided names should match completely with
1068
+ existing templates.</p>
1069
+
1034
1070
 
1035
1071
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template.html>`_
1036
1072
 
@@ -1082,7 +1118,10 @@ class IndicesClient(NamespacedClient):
1082
1118
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
1083
1119
  ) -> ObjectApiResponse[t.Any]:
1084
1120
  """
1085
- Delete a legacy index template.
1121
+ .. raw:: html
1122
+
1123
+ <p>Delete a legacy index template.</p>
1124
+
1086
1125
 
1087
1126
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-delete-template-v1.html>`_
1088
1127
 
@@ -1145,16 +1184,16 @@ class IndicesClient(NamespacedClient):
1145
1184
  run_expensive_tasks: t.Optional[bool] = None,
1146
1185
  ) -> ObjectApiResponse[t.Any]:
1147
1186
  """
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.
1187
+ .. raw:: html
1188
+
1189
+ <p>Analyze the index disk usage.
1190
+ Analyze the disk usage of each field of an index or data stream.
1191
+ This API might not support indices created in previous Elasticsearch versions.
1192
+ The result of a small index can be inaccurate as some parts of an index might not be analyzed by the API.</p>
1193
+ <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.
1194
+ Since stored fields are stored together in a compressed format, the sizes of stored fields are also estimates and can be inaccurate.
1195
+ The stored size of the <code>_id</code> field is likely underestimated while the <code>_source</code> field is overestimated.</p>
1196
+
1158
1197
 
1159
1198
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-disk-usage.html>`_
1160
1199
 
@@ -1228,14 +1267,16 @@ class IndicesClient(NamespacedClient):
1228
1267
  pretty: t.Optional[bool] = None,
1229
1268
  ) -> ObjectApiResponse[t.Any]:
1230
1269
  """
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`).
1270
+ .. raw:: html
1271
+
1272
+ <p>Downsample an index.
1273
+ 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.
1274
+ For example, a TSDS index that contains metrics sampled every 10 seconds can be downsampled to an hourly index.
1275
+ All documents within an hour interval are summarized and stored as a single document in the downsample index.</p>
1276
+ <p>NOTE: Only indices in a time series data stream are supported.
1277
+ Neither field nor document level security can be defined on the source index.
1278
+ The source index must be read only (<code>index.blocks.write: true</code>).</p>
1279
+
1239
1280
 
1240
1281
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-downsample-data-stream.html>`_
1241
1282
 
@@ -1303,7 +1344,11 @@ class IndicesClient(NamespacedClient):
1303
1344
  pretty: t.Optional[bool] = None,
1304
1345
  ) -> HeadApiResponse:
1305
1346
  """
1306
- Check indices. Check if one or more indices, index aliases, or data streams exist.
1347
+ .. raw:: html
1348
+
1349
+ <p>Check indices.
1350
+ Check if one or more indices, index aliases, or data streams exist.</p>
1351
+
1307
1352
 
1308
1353
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-exists.html>`_
1309
1354
 
@@ -1381,7 +1426,11 @@ class IndicesClient(NamespacedClient):
1381
1426
  pretty: t.Optional[bool] = None,
1382
1427
  ) -> HeadApiResponse:
1383
1428
  """
1384
- Check aliases. Checks if one or more data stream or index aliases exist.
1429
+ .. raw:: html
1430
+
1431
+ <p>Check aliases.
1432
+ Checks if one or more data stream or index aliases exist.</p>
1433
+
1385
1434
 
1386
1435
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
1387
1436
 
@@ -1451,7 +1500,11 @@ class IndicesClient(NamespacedClient):
1451
1500
  pretty: t.Optional[bool] = None,
1452
1501
  ) -> HeadApiResponse:
1453
1502
  """
1454
- Check index templates. Check whether index templates exist.
1503
+ .. raw:: html
1504
+
1505
+ <p>Check index templates.
1506
+ Check whether index templates exist.</p>
1507
+
1455
1508
 
1456
1509
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/index-templates.html>`_
1457
1510
 
@@ -1500,11 +1553,13 @@ class IndicesClient(NamespacedClient):
1500
1553
  pretty: t.Optional[bool] = None,
1501
1554
  ) -> HeadApiResponse:
1502
1555
  """
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.
1556
+ .. raw:: html
1557
+
1558
+ <p>Check existence of index templates.
1559
+ Get information about whether index templates exist.
1560
+ Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
1561
+ <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>
1562
+
1508
1563
 
1509
1564
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-template-exists-v1.html>`_
1510
1565
 
@@ -1558,10 +1613,11 @@ class IndicesClient(NamespacedClient):
1558
1613
  pretty: t.Optional[bool] = None,
1559
1614
  ) -> ObjectApiResponse[t.Any]:
1560
1615
  """
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
1563
- creation, time since rollover, the lifecycle configuration managing the index,
1564
- or any errors encountered during lifecycle execution.
1616
+ .. raw:: html
1617
+
1618
+ <p>Get the status for a data stream lifecycle.
1619
+ 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>
1620
+
1565
1621
 
1566
1622
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-explain-lifecycle.html>`_
1567
1623
 
@@ -1625,13 +1681,15 @@ class IndicesClient(NamespacedClient):
1625
1681
  ] = None,
1626
1682
  ) -> ObjectApiResponse[t.Any]:
1627
1683
  """
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.
1684
+ .. raw:: html
1685
+
1686
+ <p>Get field usage stats.
1687
+ Get field usage information for each shard and field of an index.
1688
+ Field usage statistics are automatically captured when queries are running on a cluster.
1689
+ A shard-level search request that accesses a given field, even if multiple times during that request, is counted as a single use.</p>
1690
+ <p>The response body reports the per-shard usage count of the data structures that back the fields in the index.
1691
+ A given request will increment each count by a maximum value of 1, even if the request accesses the same field multiple times.</p>
1692
+
1635
1693
 
1636
1694
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/field-usage-stats.html>`_
1637
1695
 
@@ -1719,22 +1777,18 @@ class IndicesClient(NamespacedClient):
1719
1777
  wait_if_ongoing: t.Optional[bool] = None,
1720
1778
  ) -> ObjectApiResponse[t.Any]:
1721
1779
  """
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.
1780
+ .. raw:: html
1781
+
1782
+ <p>Flush data streams or indices.
1783
+ 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.
1784
+ 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.
1785
+ 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>
1786
+ <p>After each operation has been flushed it is permanently stored in the Lucene index.
1787
+ This may mean that there is no need to maintain an additional copy of it in the transaction log.
1788
+ The transaction log is made up of multiple files, called generations, and Elasticsearch will delete any generation files when they are no longer needed, freeing up disk space.</p>
1789
+ <p>It is also possible to trigger a flush on one or more indices using the flush API, although it is rare for users to need to call this API directly.
1790
+ If you call the flush API after indexing some documents then a successful response indicates that Elasticsearch has flushed all the documents that were indexed before the flush API was called.</p>
1791
+
1738
1792
 
1739
1793
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-flush.html>`_
1740
1794
 
@@ -1817,49 +1871,49 @@ class IndicesClient(NamespacedClient):
1817
1871
  wait_for_completion: t.Optional[bool] = None,
1818
1872
  ) -> ObjectApiResponse[t.Any]:
1819
1873
  """
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
- ```
1874
+ .. raw:: html
1875
+
1876
+ <p>Force a merge.
1877
+ Perform the force merge operation on the shards of one or more indices.
1878
+ For data streams, the API forces a merge on the shards of the stream's backing indices.</p>
1879
+ <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.
1880
+ Merging normally happens automatically, but sometimes it is useful to trigger a merge manually.</p>
1881
+ <p>WARNING: We recommend force merging only a read-only index (meaning the index is no longer receiving writes).
1882
+ When documents are updated or deleted, the old version is not immediately removed but instead soft-deleted and marked with a &quot;tombstone&quot;.
1883
+ These soft-deleted documents are automatically cleaned up during regular segment merges.
1884
+ But force merge can cause very large (greater than 5 GB) segments to be produced, which are not eligible for regular merges.
1885
+ So the number of soft-deleted documents can then grow rapidly, resulting in higher disk usage and worse search performance.
1886
+ If you regularly force merge an index receiving writes, this can also make snapshots more expensive, since the new documents can't be backed up incrementally.</p>
1887
+ <p><strong>Blocks during a force merge</strong></p>
1888
+ <p>Calls to this API block until the merge is complete (unless request contains <code>wait_for_completion=false</code>).
1889
+ If the client connection is lost before completion then the force merge process will continue in the background.
1890
+ Any new requests to force merge the same indices will also block until the ongoing force merge is complete.</p>
1891
+ <p><strong>Running force merge asynchronously</strong></p>
1892
+ <p>If the request contains <code>wait_for_completion=false</code>, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to get the status of the task.
1893
+ However, you can not cancel this task as the force merge task is not cancelable.
1894
+ Elasticsearch creates a record of this task as a document at <code>_tasks/&lt;task_id&gt;</code>.
1895
+ When you are done with a task, you should delete the task document so Elasticsearch can reclaim the space.</p>
1896
+ <p><strong>Force merging multiple indices</strong></p>
1897
+ <p>You can force merge multiple indices with a single request by targeting:</p>
1898
+ <ul>
1899
+ <li>One or more data streams that contain multiple backing indices</li>
1900
+ <li>Multiple indices</li>
1901
+ <li>One or more aliases</li>
1902
+ <li>All data streams and indices in a cluster</li>
1903
+ </ul>
1904
+ <p>Each targeted shard is force-merged separately using the force_merge threadpool.
1905
+ By default each node only has a single <code>force_merge</code> thread which means that the shards on that node are force-merged one at a time.
1906
+ If you expand the <code>force_merge</code> threadpool on a node then it will force merge its shards in parallel</p>
1907
+ <p>Force merge makes the storage for the shard being merged temporarily increase, as it may require free space up to triple its size in case <code>max_num_segments parameter</code> is set to <code>1</code>, to rewrite all segments into a new one.</p>
1908
+ <p><strong>Data streams and time-based indices</strong></p>
1909
+ <p>Force-merging is useful for managing a data stream's older backing indices and other time-based indices, particularly after a rollover.
1910
+ In these cases, each index only receives indexing traffic for a certain period of time.
1911
+ Once an index receive no more writes, its shards can be force-merged to a single segment.
1912
+ This can be a good idea because single-segment shards can sometimes use simpler and more efficient data structures to perform searches.
1913
+ For example:</p>
1914
+ <pre><code>POST /.ds-my-data-stream-2099.03.07-000001/_forcemerge?max_num_segments=1
1915
+ </code></pre>
1916
+
1863
1917
 
1864
1918
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-forcemerge.html>`_
1865
1919
 
@@ -1952,8 +2006,12 @@ class IndicesClient(NamespacedClient):
1952
2006
  pretty: t.Optional[bool] = None,
1953
2007
  ) -> ObjectApiResponse[t.Any]:
1954
2008
  """
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.
2009
+ .. raw:: html
2010
+
2011
+ <p>Get index information.
2012
+ Get information about one or more indices. For data streams, the API returns information about the
2013
+ stream’s backing indices.</p>
2014
+
1957
2015
 
1958
2016
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-index.html>`_
1959
2017
 
@@ -2042,7 +2100,11 @@ class IndicesClient(NamespacedClient):
2042
2100
  pretty: t.Optional[bool] = None,
2043
2101
  ) -> ObjectApiResponse[t.Any]:
2044
2102
  """
2045
- Get aliases. Retrieves information for one or more data stream or index aliases.
2103
+ .. raw:: html
2104
+
2105
+ <p>Get aliases.
2106
+ Retrieves information for one or more data stream or index aliases.</p>
2107
+
2046
2108
 
2047
2109
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-alias.html>`_
2048
2110
 
@@ -2124,8 +2186,11 @@ class IndicesClient(NamespacedClient):
2124
2186
  pretty: t.Optional[bool] = None,
2125
2187
  ) -> ObjectApiResponse[t.Any]:
2126
2188
  """
2127
- Get data stream lifecycles. Retrieves the data stream lifecycle configuration
2128
- of one or more data streams.
2189
+ .. raw:: html
2190
+
2191
+ <p>Get data stream lifecycles.
2192
+ Retrieves the data stream lifecycle configuration of one or more data streams.</p>
2193
+
2129
2194
 
2130
2195
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle.html>`_
2131
2196
 
@@ -2179,8 +2244,11 @@ class IndicesClient(NamespacedClient):
2179
2244
  pretty: t.Optional[bool] = None,
2180
2245
  ) -> ObjectApiResponse[t.Any]:
2181
2246
  """
2182
- Get data stream lifecycle stats. Get statistics about the data streams that are
2183
- managed by a data stream lifecycle.
2247
+ .. raw:: html
2248
+
2249
+ <p>Get data stream lifecycle stats.
2250
+ Get statistics about the data streams that are managed by a data stream lifecycle.</p>
2251
+
2184
2252
 
2185
2253
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-get-lifecycle-stats.html>`_
2186
2254
  """
@@ -2227,7 +2295,11 @@ class IndicesClient(NamespacedClient):
2227
2295
  verbose: t.Optional[bool] = None,
2228
2296
  ) -> ObjectApiResponse[t.Any]:
2229
2297
  """
2230
- Get data streams. Retrieves information about one or more data streams.
2298
+ .. raw:: html
2299
+
2300
+ <p>Get data streams.
2301
+ Retrieves information about one or more data streams.</p>
2302
+
2231
2303
 
2232
2304
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2233
2305
 
@@ -2302,10 +2374,13 @@ class IndicesClient(NamespacedClient):
2302
2374
  pretty: t.Optional[bool] = None,
2303
2375
  ) -> ObjectApiResponse[t.Any]:
2304
2376
  """
2305
- Get mapping definitions. Retrieves mapping definitions for one or more fields.
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.
2377
+ .. raw:: html
2378
+
2379
+ <p>Get mapping definitions.
2380
+ Retrieves mapping definitions for one or more fields.
2381
+ For data streams, the API retrieves field mappings for the stream’s backing indices.</p>
2382
+ <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>
2383
+
2309
2384
 
2310
2385
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-field-mapping.html>`_
2311
2386
 
@@ -2382,7 +2457,11 @@ class IndicesClient(NamespacedClient):
2382
2457
  pretty: t.Optional[bool] = None,
2383
2458
  ) -> ObjectApiResponse[t.Any]:
2384
2459
  """
2385
- Get index templates. Get information about one or more index templates.
2460
+ .. raw:: html
2461
+
2462
+ <p>Get index templates.
2463
+ Get information about one or more index templates.</p>
2464
+
2386
2465
 
2387
2466
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template.html>`_
2388
2467
 
@@ -2455,8 +2534,11 @@ class IndicesClient(NamespacedClient):
2455
2534
  pretty: t.Optional[bool] = None,
2456
2535
  ) -> ObjectApiResponse[t.Any]:
2457
2536
  """
2458
- Get mapping definitions. For data streams, the API retrieves mappings for the
2459
- stream’s backing indices.
2537
+ .. raw:: html
2538
+
2539
+ <p>Get mapping definitions.
2540
+ For data streams, the API retrieves mappings for the stream’s backing indices.</p>
2541
+
2460
2542
 
2461
2543
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-mapping.html>`_
2462
2544
 
@@ -2540,8 +2622,12 @@ class IndicesClient(NamespacedClient):
2540
2622
  pretty: t.Optional[bool] = None,
2541
2623
  ) -> ObjectApiResponse[t.Any]:
2542
2624
  """
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.
2625
+ .. raw:: html
2626
+
2627
+ <p>Get index settings.
2628
+ Get setting information for one or more indices.
2629
+ For data streams, it returns setting information for the stream's backing indices.</p>
2630
+
2545
2631
 
2546
2632
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-settings.html>`_
2547
2633
 
@@ -2628,9 +2714,12 @@ class IndicesClient(NamespacedClient):
2628
2714
  pretty: t.Optional[bool] = None,
2629
2715
  ) -> ObjectApiResponse[t.Any]:
2630
2716
  """
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.
2717
+ .. raw:: html
2718
+
2719
+ <p>Get index templates.
2720
+ Get information about one or more index templates.</p>
2721
+ <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>
2722
+
2634
2723
 
2635
2724
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-template-v1.html>`_
2636
2725
 
@@ -2689,14 +2778,20 @@ class IndicesClient(NamespacedClient):
2689
2778
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
2690
2779
  ) -> ObjectApiResponse[t.Any]:
2691
2780
  """
2692
- Convert an index alias to a data stream. Converts an index alias to a data stream.
2693
- You must have a matching index template that is data stream enabled. The alias
2694
- must meet the following criteria: The alias must have a write index; All indices
2695
- for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos`
2696
- field type; The alias must not have any filters; The alias must not use custom
2697
- routing. If successful, the request removes the alias and creates a data stream
2698
- with the same name. The indices for the alias become hidden backing indices for
2699
- the stream. The write index for the alias becomes the write index for the stream.
2781
+ .. raw:: html
2782
+
2783
+ <p>Convert an index alias to a data stream.
2784
+ Converts an index alias to a data stream.
2785
+ You must have a matching index template that is data stream enabled.
2786
+ The alias must meet the following criteria:
2787
+ The alias must have a write index;
2788
+ All indices for the alias must have a <code>@timestamp</code> field mapping of a <code>date</code> or <code>date_nanos</code> field type;
2789
+ The alias must not have any filters;
2790
+ The alias must not use custom routing.
2791
+ If successful, the request removes the alias and creates a data stream with the same name.
2792
+ The indices for the alias become hidden backing indices for the stream.
2793
+ The write index for the alias becomes the write index for the stream.</p>
2794
+
2700
2795
 
2701
2796
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2702
2797
 
@@ -2748,8 +2843,11 @@ class IndicesClient(NamespacedClient):
2748
2843
  body: t.Optional[t.Dict[str, t.Any]] = None,
2749
2844
  ) -> ObjectApiResponse[t.Any]:
2750
2845
  """
2751
- Update data streams. Performs one or more data stream modification actions in
2752
- a single atomic operation.
2846
+ .. raw:: html
2847
+
2848
+ <p>Update data streams.
2849
+ Performs one or more data stream modification actions in a single atomic operation.</p>
2850
+
2753
2851
 
2754
2852
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2755
2853
 
@@ -2809,27 +2907,26 @@ class IndicesClient(NamespacedClient):
2809
2907
  ] = None,
2810
2908
  ) -> ObjectApiResponse[t.Any]:
2811
2909
  """
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.
2910
+ .. raw:: html
2911
+
2912
+ <p>Open a closed index.
2913
+ For data streams, the API opens any closed backing indices.</p>
2914
+ <p>A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.
2915
+ It is not possible to index documents or to search for documents in a closed index.
2916
+ 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>
2917
+ <p>When opening or closing an index, the master is responsible for restarting the index shards to reflect the new state of the index.
2918
+ The shards will then go through the normal recovery process.
2919
+ The data of opened or closed indices is automatically replicated by the cluster to ensure that enough shard copies are safely kept around at all times.</p>
2920
+ <p>You can open and close multiple indices.
2921
+ An error is thrown if the request explicitly refers to a missing index.
2922
+ This behavior can be turned off by using the <code>ignore_unavailable=true</code> parameter.</p>
2923
+ <p>By default, you must explicitly name the indices you are opening or closing.
2924
+ To open or close indices with <code>_all</code>, <code>*</code>, or other wildcard expressions, change the <code>action.destructive_requires_name</code> setting to <code>false</code>.
2925
+ This setting can also be changed with the cluster update settings API.</p>
2926
+ <p>Closed indices consume a significant amount of disk-space which can cause problems in managed environments.
2927
+ Closing indices can be turned off with the cluster settings API by setting <code>cluster.indices.close.enable</code> to <code>false</code>.</p>
2928
+ <p>Because opening or closing an index allocates its shards, the <code>wait_for_active_shards</code> setting on index creation applies to the <code>_open</code> and <code>_close</code> index actions as well.</p>
2929
+
2833
2930
 
2834
2931
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-open-close.html>`_
2835
2932
 
@@ -2904,18 +3001,18 @@ class IndicesClient(NamespacedClient):
2904
3001
  pretty: t.Optional[bool] = None,
2905
3002
  ) -> ObjectApiResponse[t.Any]:
2906
3003
  """
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.
3004
+ .. raw:: html
3005
+
3006
+ <p>Promote a data stream.
3007
+ Promote a data stream from a replicated data stream managed by cross-cluster replication (CCR) to a regular data stream.</p>
3008
+ <p>With CCR auto following, a data stream from a remote cluster can be replicated to the local cluster.
3009
+ These data streams can't be rolled over in the local cluster.
3010
+ These replicated data streams roll over only if the upstream data stream rolls over.
3011
+ In the event that the remote cluster is no longer available, the data stream in the local cluster can be promoted to a regular data stream, which allows these data streams to be rolled over in the local cluster.</p>
3012
+ <p>NOTE: When promoting a data stream, ensure the local cluster has a data stream enabled index template that matches the data stream.
3013
+ If this is missing, the data stream will not be able to roll over until a matching index template is created.
3014
+ This will affect the lifecycle management of the data stream and interfere with the data stream size and retention.</p>
3015
+
2919
3016
 
2920
3017
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams.html>`_
2921
3018
 
@@ -2977,7 +3074,11 @@ class IndicesClient(NamespacedClient):
2977
3074
  body: t.Optional[t.Dict[str, t.Any]] = None,
2978
3075
  ) -> ObjectApiResponse[t.Any]:
2979
3076
  """
2980
- Create or update an alias. Adds a data stream or index to an alias.
3077
+ .. raw:: html
3078
+
3079
+ <p>Create or update an alias.
3080
+ Adds a data stream or index to an alias.</p>
3081
+
2981
3082
 
2982
3083
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
2983
3084
 
@@ -3079,8 +3180,11 @@ class IndicesClient(NamespacedClient):
3079
3180
  body: t.Optional[t.Dict[str, t.Any]] = None,
3080
3181
  ) -> ObjectApiResponse[t.Any]:
3081
3182
  """
3082
- Update data stream lifecycles. Update the data stream lifecycle of the specified
3083
- data streams.
3183
+ .. raw:: html
3184
+
3185
+ <p>Update data stream lifecycles.
3186
+ Update the data stream lifecycle of the specified data streams.</p>
3187
+
3084
3188
 
3085
3189
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-put-lifecycle.html>`_
3086
3190
 
@@ -3181,34 +3285,30 @@ class IndicesClient(NamespacedClient):
3181
3285
  body: t.Optional[t.Dict[str, t.Any]] = None,
3182
3286
  ) -> ObjectApiResponse[t.Any]:
3183
3287
  """
3184
- Create or update an index template. Index templates define settings, mappings,
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.
3288
+ .. raw:: html
3289
+
3290
+ <p>Create or update an index template.
3291
+ Index templates define settings, mappings, and aliases that can be applied automatically to new indices.</p>
3292
+ <p>Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name.
3293
+ Index templates are applied during data stream or index creation.
3294
+ For data streams, these settings and mappings are applied when the stream's backing indices are created.
3295
+ Settings and mappings specified in a create index API request override any settings or mappings specified in an index template.
3296
+ Changes to index templates do not affect existing indices, including the existing backing indices of a data stream.</p>
3297
+ <p>You can use C-style <code>/* *\\/</code> block comments in index templates.
3298
+ You can include comments anywhere in the request body, except before the opening curly bracket.</p>
3299
+ <p><strong>Multiple matching templates</strong></p>
3300
+ <p>If multiple index templates match the name of a new index or data stream, the template with the highest priority is used.</p>
3301
+ <p>Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities.</p>
3302
+ <p><strong>Composing aliases, mappings, and settings</strong></p>
3303
+ <p>When multiple component templates are specified in the <code>composed_of</code> field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates.
3304
+ Any mappings, settings, or aliases from the parent index template are merged in next.
3305
+ Finally, any configuration on the index request itself is merged.
3306
+ Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration.
3307
+ If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one.
3308
+ This recursive merging strategy applies not only to field mappings, but also root options like <code>dynamic_templates</code> and <code>meta</code>.
3309
+ If an earlier component contains a <code>dynamic_templates</code> block, then by default new <code>dynamic_templates</code> entries are appended onto the end.
3310
+ If an entry already exists with the same key, then it is overwritten by the new definition.</p>
3311
+
3212
3312
 
3213
3313
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-template.html>`_
3214
3314
 
@@ -3341,10 +3441,7 @@ class IndicesClient(NamespacedClient):
3341
3441
  ] = None,
3342
3442
  dynamic_date_formats: t.Optional[t.Sequence[str]] = None,
3343
3443
  dynamic_templates: t.Optional[
3344
- t.Union[
3345
- t.Mapping[str, t.Mapping[str, t.Any]],
3346
- t.Sequence[t.Mapping[str, t.Mapping[str, t.Any]]],
3347
- ]
3444
+ t.Sequence[t.Mapping[str, t.Mapping[str, t.Any]]]
3348
3445
  ] = None,
3349
3446
  error_trace: t.Optional[bool] = None,
3350
3447
  expand_wildcards: t.Optional[
@@ -3372,27 +3469,29 @@ class IndicesClient(NamespacedClient):
3372
3469
  body: t.Optional[t.Dict[str, t.Any]] = None,
3373
3470
  ) -> ObjectApiResponse[t.Any]:
3374
3471
  """
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.
3472
+ .. raw:: html
3473
+
3474
+ <p>Update field mappings.
3475
+ Add new fields to an existing data stream or index.
3476
+ You can also use this API to change the search settings of existing fields and add new properties to existing object fields.
3477
+ For data streams, these changes are applied to all backing indices by default.</p>
3478
+ <p><strong>Add multi-fields to an existing field</strong></p>
3479
+ <p>Multi-fields let you index the same field in different ways.
3480
+ You can use this API to update the fields mapping parameter and enable multi-fields for an existing field.
3481
+ WARNING: If an index (or data stream) contains documents when you add a multi-field, those documents will not have values for the new multi-field.
3482
+ You can populate the new multi-field with the update by query API.</p>
3483
+ <p><strong>Change supported mapping parameters for an existing field</strong></p>
3484
+ <p>The documentation for each mapping parameter indicates whether you can update it for an existing field using this API.
3485
+ For example, you can use the update mapping API to update the <code>ignore_above</code> parameter.</p>
3486
+ <p><strong>Change the mapping of an existing field</strong></p>
3487
+ <p>Except for supported mapping parameters, you can't change the mapping or field type of an existing field.
3488
+ Changing an existing field could invalidate data that's already indexed.</p>
3489
+ <p>If you need to change the mapping of a field in a data stream's backing indices, refer to documentation about modifying data streams.
3490
+ If you need to change the mapping of a field in other indices, create a new index with the correct mapping and reindex your data into that index.</p>
3491
+ <p><strong>Rename a field</strong></p>
3492
+ <p>Renaming a field would invalidate data already indexed under the old field name.
3493
+ Instead, add an alias field to create an alternate field name.</p>
3494
+
3396
3495
 
3397
3496
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-put-mapping.html>`_
3398
3497
 
@@ -3521,21 +3620,23 @@ class IndicesClient(NamespacedClient):
3521
3620
  timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
3522
3621
  ) -> ObjectApiResponse[t.Any]:
3523
3622
  """
3524
- Update index settings. Changes dynamic index settings in real time. For data
3525
- streams, index setting changes are applied to all backing indices by default.
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.
3623
+ .. raw:: html
3624
+
3625
+ <p>Update index settings.
3626
+ Changes dynamic index settings in real time.
3627
+ For data streams, index setting changes are applied to all backing indices by default.</p>
3628
+ <p>To revert a setting to the default value, use a null value.
3629
+ The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation.
3630
+ To preserve existing settings from being updated, set the <code>preserve_existing</code> parameter to <code>true</code>.</p>
3631
+ <p>NOTE: You can only define new analyzers on closed indices.
3632
+ To add an analyzer, you must close the index, define the analyzer, and reopen the index.
3633
+ You cannot close the write index of a data stream.
3634
+ To update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream.
3635
+ Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices.
3636
+ This affects searches and any new data added to the stream after the rollover.
3637
+ However, it does not affect the data stream's backing indices or their existing data.
3638
+ To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it.</p>
3639
+
3539
3640
 
3540
3641
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-update-settings.html>`_
3541
3642
 
@@ -3639,24 +3740,24 @@ class IndicesClient(NamespacedClient):
3639
3740
  body: t.Optional[t.Dict[str, t.Any]] = None,
3640
3741
  ) -> ObjectApiResponse[t.Any]:
3641
3742
  """
3642
- Create or update an index template. Index templates define settings, mappings,
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.
3743
+ .. raw:: html
3744
+
3745
+ <p>Create or update an index template.
3746
+ Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
3747
+ Elasticsearch applies templates to new indices based on an index pattern that matches the index name.</p>
3748
+ <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>
3749
+ <p>Composable templates always take precedence over legacy templates.
3750
+ If no composable template matches a new index, matching legacy templates are applied according to their order.</p>
3751
+ <p>Index templates are only applied during index creation.
3752
+ Changes to index templates do not affect existing indices.
3753
+ Settings and mappings specified in create index API requests override any settings or mappings specified in an index template.</p>
3754
+ <p>You can use C-style <code>/* *\\/</code> block comments in index templates.
3755
+ You can include comments anywhere in the request body, except before the opening curly bracket.</p>
3756
+ <p><strong>Indices matching multiple templates</strong></p>
3757
+ <p>Multiple index templates can potentially match an index, in this case, both the settings and mappings are merged into the final configuration of the index.
3758
+ The order of the merging can be controlled using the order parameter, with lower order being applied first, and higher orders overriding them.
3759
+ NOTE: Multiple matching templates with the same order value will result in a non-deterministic merging order.</p>
3760
+
3660
3761
 
3661
3762
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-templates-v1.html>`_
3662
3763
 
@@ -3737,27 +3838,28 @@ class IndicesClient(NamespacedClient):
3737
3838
  pretty: t.Optional[bool] = None,
3738
3839
  ) -> ObjectApiResponse[t.Any]:
3739
3840
  """
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.
3841
+ .. raw:: html
3842
+
3843
+ <p>Get index recovery information.
3844
+ Get information about ongoing and completed shard recoveries for one or more indices.
3845
+ For data streams, the API returns information for the stream's backing indices.</p>
3846
+ <p>All recoveries, whether ongoing or complete, are kept in the cluster state and may be reported on at any time.</p>
3847
+ <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.
3848
+ When a shard recovery completes, the recovered shard is available for search and indexing.</p>
3849
+ <p>Recovery automatically occurs during the following processes:</p>
3850
+ <ul>
3851
+ <li>When creating an index for the first time.</li>
3852
+ <li>When a node rejoins the cluster and starts up any missing primary shard copies using the data that it holds in its data path.</li>
3853
+ <li>Creation of new replica shard copies from the primary.</li>
3854
+ <li>Relocation of a shard copy to a different node in the same cluster.</li>
3855
+ <li>A snapshot restore operation.</li>
3856
+ <li>A clone, shrink, or split operation.</li>
3857
+ </ul>
3858
+ <p>You can determine the cause of a shard recovery using the recovery or cat recovery APIs.</p>
3859
+ <p>The index recovery API reports information about completed recoveries only for shard copies that currently exist in the cluster.
3860
+ It only reports the last recovery for each shard copy and does not report historical information about earlier recoveries, nor does it report information about the recoveries of shard copies that no longer exist.
3861
+ This means that if a shard copy completes a recovery and then Elasticsearch relocates it onto a different node then the information about the original recovery will not be shown in the recovery API.</p>
3862
+
3761
3863
 
3762
3864
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-recovery.html>`_
3763
3865
 
@@ -3819,19 +3921,19 @@ class IndicesClient(NamespacedClient):
3819
3921
  pretty: t.Optional[bool] = None,
3820
3922
  ) -> ObjectApiResponse[t.Any]:
3821
3923
  """
3822
- Refresh an index. A refresh makes recent operations performed on one or more
3823
- indices available for search. For data streams, the API runs the refresh operation
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.
3924
+ .. raw:: html
3925
+
3926
+ <p>Refresh an index.
3927
+ A refresh makes recent operations performed on one or more indices available for search.
3928
+ For data streams, the API runs the refresh operation on the stream’s backing indices.</p>
3929
+ <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.
3930
+ You can change this default interval with the <code>index.refresh_interval</code> setting.</p>
3931
+ <p>Refresh requests are synchronous and do not return a response until the refresh operation completes.</p>
3932
+ <p>Refreshes are resource-intensive.
3933
+ To ensure good cluster performance, it's recommended to wait for Elasticsearch's periodic refresh rather than performing an explicit refresh when possible.</p>
3934
+ <p>If your application workflow indexes documents and then runs a search to retrieve the indexed document, it's recommended to use the index API's <code>refresh=wait_for</code> query parameter option.
3935
+ This option ensures the indexing operation waits for a periodic refresh before running the search.</p>
3936
+
3835
3937
 
3836
3938
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-refresh.html>`_
3837
3939
 
@@ -3901,21 +4003,20 @@ class IndicesClient(NamespacedClient):
3901
4003
  pretty: t.Optional[bool] = None,
3902
4004
  ) -> ObjectApiResponse[t.Any]:
3903
4005
  """
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.
4006
+ .. raw:: html
4007
+
4008
+ <p>Reload search analyzers.
4009
+ Reload an index's search analyzers and their resources.
4010
+ For data streams, the API reloads search analyzers and resources for the stream's backing indices.</p>
4011
+ <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>
4012
+ <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.
4013
+ To be eligible, the token filter must have an <code>updateable</code> flag of <code>true</code> and only be used in search analyzers.</p>
4014
+ <p>NOTE: This API does not perform a reload for each shard of an index.
4015
+ Instead, it performs a reload for each node containing index shards.
4016
+ As a result, the total shard count returned by the API can differ from the number of index shards.
4017
+ Because reloading affects every node with an index shard, it is important to update the synonym file on every data node in the cluster--including nodes that don't contain a shard replica--before using this API.
4018
+ This ensures the synonym file is updated everywhere in the cluster in case shards are relocated in the future.</p>
4019
+
3919
4020
 
3920
4021
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-reload-analyzers.html>`_
3921
4022
 
@@ -3979,38 +4080,33 @@ class IndicesClient(NamespacedClient):
3979
4080
  pretty: t.Optional[bool] = None,
3980
4081
  ) -> ObjectApiResponse[t.Any]:
3981
4082
  """
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.
4083
+ .. raw:: html
4084
+
4085
+ <p>Resolve the cluster.
4086
+ Resolve the specified index expressions to return information about each cluster, including the local cluster, if included.
4087
+ Multiple patterns and remote clusters are supported.</p>
4088
+ <p>This endpoint is useful before doing a cross-cluster search in order to determine which remote clusters should be included in a search.</p>
4089
+ <p>You use the same index expression with this endpoint as you would for cross-cluster search.
4090
+ Index and cluster exclusions are also supported with this endpoint.</p>
4091
+ <p>For each cluster in the index expression, information is returned about:</p>
4092
+ <ul>
4093
+ <li>Whether the querying (&quot;local&quot;) cluster is currently connected to each remote cluster in the index expression scope.</li>
4094
+ <li>Whether each remote cluster is configured with <code>skip_unavailable</code> as <code>true</code> or <code>false</code>.</li>
4095
+ <li>Whether there are any indices, aliases, or data streams on that cluster that match the index expression.</li>
4096
+ <li>Whether the search is likely to have errors returned when you do the cross-cluster search (including any authorization errors if you do not have permission to query the index).</li>
4097
+ <li>Cluster version information, including the Elasticsearch server version.</li>
4098
+ </ul>
4099
+ <p>For example, <code>GET /_resolve/cluster/my-index-*,cluster*:my-index-*</code> returns information about the local cluster and all remotely configured clusters that start with the alias <code>cluster*</code>.
4100
+ Each cluster returns information about whether it has any indices, aliases or data streams that match <code>my-index-*</code>.</p>
4101
+ <p><strong>Advantages of using this endpoint before a cross-cluster search</strong></p>
4102
+ <p>You may want to exclude a cluster or index from a search when:</p>
4103
+ <ul>
4104
+ <li>A remote cluster is not currently connected and is configured with <code>skip_unavailable=false</code>. Running a cross-cluster search under those conditions will cause the entire search to fail.</li>
4105
+ <li>A cluster has no matching indices, aliases or data streams for the index expression (or your user does not have permissions to search them). For example, suppose your index expression is <code>logs*,remote1:logs*</code> and the remote1 cluster has no indices, aliases or data streams that match <code>logs*</code>. In that case, that cluster will return no results from that cluster if you include it in a cross-cluster search.</li>
4106
+ <li>The index expression (combined with any query parameters you specify) will likely cause an exception to be thrown when you do the search. In these cases, the &quot;error&quot; field in the <code>_resolve/cluster</code> response will be present. (This is also where security/permission errors will be shown.)</li>
4107
+ <li>A remote cluster is an older version that does not support the feature you want to use in your search.</li>
4108
+ </ul>
4109
+
4014
4110
 
4015
4111
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-cluster-api.html>`_
4016
4112
 
@@ -4083,8 +4179,12 @@ class IndicesClient(NamespacedClient):
4083
4179
  pretty: t.Optional[bool] = None,
4084
4180
  ) -> ObjectApiResponse[t.Any]:
4085
4181
  """
4086
- Resolve indices. Resolve the names and/or index patterns for indices, aliases,
4087
- and data streams. Multiple patterns and remote clusters are supported.
4182
+ .. raw:: html
4183
+
4184
+ <p>Resolve indices.
4185
+ Resolve the names and/or index patterns for indices, aliases, and data streams.
4186
+ Multiple patterns and remote clusters are supported.</p>
4187
+
4088
4188
 
4089
4189
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-resolve-index-api.html>`_
4090
4190
 
@@ -4157,33 +4257,35 @@ class IndicesClient(NamespacedClient):
4157
4257
  body: t.Optional[t.Dict[str, t.Any]] = None,
4158
4258
  ) -> ObjectApiResponse[t.Any]:
4159
4259
  """
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`.
4260
+ .. raw:: html
4261
+
4262
+ <p>Roll over to a new index.
4263
+ TIP: It is recommended to use the index lifecycle rollover action to automate rollovers.</p>
4264
+ <p>The rollover API creates a new index for a data stream or index alias.
4265
+ The API behavior depends on the rollover target.</p>
4266
+ <p><strong>Roll over a data stream</strong></p>
4267
+ <p>If you roll over a data stream, the API creates a new write index for the stream.
4268
+ The stream's previous write index becomes a regular backing index.
4269
+ A rollover also increments the data stream's generation.</p>
4270
+ <p><strong>Roll over an index alias with a write index</strong></p>
4271
+ <p>TIP: Prior to Elasticsearch 7.9, you'd typically use an index alias with a write index to manage time series data.
4272
+ Data streams replace this functionality, require less maintenance, and automatically integrate with data tiers.</p>
4273
+ <p>If an index alias points to multiple indices, one of the indices must be a write index.
4274
+ The rollover API creates a new write index for the alias with <code>is_write_index</code> set to <code>true</code>.
4275
+ The API also <code>sets is_write_index</code> to <code>false</code> for the previous write index.</p>
4276
+ <p><strong>Roll over an index alias with one index</strong></p>
4277
+ <p>If you roll over an index alias that points to only one index, the API creates a new index for the alias and removes the original index from the alias.</p>
4278
+ <p>NOTE: A rollover creates a new index and is subject to the <code>wait_for_active_shards</code> setting.</p>
4279
+ <p><strong>Increment index names for an alias</strong></p>
4280
+ <p>When you roll over an index alias, you can specify a name for the new index.
4281
+ If you don't specify a name and the current index ends with <code>-</code> and a number, such as <code>my-index-000001</code> or <code>my-index-3</code>, the new index name increments that number.
4282
+ For example, if you roll over an alias with a current index of <code>my-index-000001</code>, the rollover creates a new index named <code>my-index-000002</code>.
4283
+ This number is always six characters and zero-padded, regardless of the previous index's name.</p>
4284
+ <p>If you use an index alias for time series data, you can use date math in the index name to track the rollover date.
4285
+ For example, you can create an alias that points to an index named <code>&lt;my-index-{now/d}-000001&gt;</code>.
4286
+ If you create the index on May 6, 2099, the index's name is <code>my-index-2099.05.06-000001</code>.
4287
+ If you roll over the alias on May 7, 2099, the new index's name is <code>my-index-2099.05.07-000002</code>.</p>
4288
+
4187
4289
 
4188
4290
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-rollover-index.html>`_
4189
4291
 
@@ -4288,9 +4390,12 @@ class IndicesClient(NamespacedClient):
4288
4390
  verbose: t.Optional[bool] = None,
4289
4391
  ) -> ObjectApiResponse[t.Any]:
4290
4392
  """
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.
4393
+ .. raw:: html
4394
+
4395
+ <p>Get index segments.
4396
+ Get low-level information about the Lucene segments in index shards.
4397
+ For data streams, the API returns information about the stream's backing indices.</p>
4398
+
4294
4399
 
4295
4400
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-segments.html>`_
4296
4401
 
@@ -4369,14 +4474,20 @@ class IndicesClient(NamespacedClient):
4369
4474
  ] = None,
4370
4475
  ) -> ObjectApiResponse[t.Any]:
4371
4476
  """
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.
4477
+ .. raw:: html
4478
+
4479
+ <p>Get index shard stores.
4480
+ Get store information about replica shards in one or more indices.
4481
+ For data streams, the API retrieves store information for the stream's backing indices.</p>
4482
+ <p>The index shard stores API returns the following information:</p>
4483
+ <ul>
4484
+ <li>The node on which each replica shard exists.</li>
4485
+ <li>The allocation ID for each replica shard.</li>
4486
+ <li>A unique ID for each replica shard.</li>
4487
+ <li>Any errors encountered while opening the shard index or from an earlier failure.</li>
4488
+ </ul>
4489
+ <p>By default, the API returns store information only for primary shards that are unassigned or have one or more unassigned replica shards.</p>
4490
+
4380
4491
 
4381
4492
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shards-stores.html>`_
4382
4493
 
@@ -4447,39 +4558,38 @@ class IndicesClient(NamespacedClient):
4447
4558
  body: t.Optional[t.Dict[str, t.Any]] = None,
4448
4559
  ) -> ObjectApiResponse[t.Any]:
4449
4560
  """
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.
4561
+ .. raw:: html
4562
+
4563
+ <p>Shrink an index.
4564
+ Shrink an index into a new index with fewer primary shards.</p>
4565
+ <p>Before you can shrink an index:</p>
4566
+ <ul>
4567
+ <li>The index must be read-only.</li>
4568
+ <li>A copy of every shard in the index must reside on the same node.</li>
4569
+ <li>The index must have a green health status.</li>
4570
+ </ul>
4571
+ <p>To make shard allocation easier, we recommend you also remove the index's replica shards.
4572
+ You can later re-add replica shards as part of the shrink operation.</p>
4573
+ <p>The requested number of primary shards in the target index must be a factor of the number of shards in the source index.
4574
+ For example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1.
4575
+ If the number of shards in the index is a prime number it can only be shrunk into a single primary shard
4576
+ Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.</p>
4577
+ <p>The current write index on a data stream cannot be shrunk. In order to shrink the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be shrunk.</p>
4578
+ <p>A shrink operation:</p>
4579
+ <ul>
4580
+ <li>Creates a new target index with the same definition as the source index, but with a smaller number of primary shards.</li>
4581
+ <li>Hard-links segments from the source index into the target index. If the file system does not support hard-linking, then all segments are copied into the new index, which is a much more time consuming process. Also if using multiple data paths, shards on different data paths require a full copy of segment files if they are not on the same disk since hardlinks do not work across disks.</li>
4582
+ <li>Recovers the target index as though it were a closed index which had just been re-opened. Recovers shards to the <code>.routing.allocation.initial_recovery._id</code> index setting.</li>
4583
+ </ul>
4584
+ <p>IMPORTANT: Indices can only be shrunk if they satisfy the following requirements:</p>
4585
+ <ul>
4586
+ <li>The target index must not exist.</li>
4587
+ <li>The source index must have more primary shards than the target index.</li>
4588
+ <li>The number of primary shards in the target index must be a factor of the number of primary shards in the source index. The source index must have more primary shards than the target index.</li>
4589
+ <li>The index must not contain more than 2,147,483,519 documents in total across all shards that will be shrunk into a single shard on the target index as this is the maximum number of docs that can fit into a single shard.</li>
4590
+ <li>The node handling the shrink process must have sufficient free disk space to accommodate a second copy of the existing index.</li>
4591
+ </ul>
4592
+
4483
4593
 
4484
4594
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-shrink-index.html>`_
4485
4595
 
@@ -4554,8 +4664,11 @@ class IndicesClient(NamespacedClient):
4554
4664
  pretty: t.Optional[bool] = None,
4555
4665
  ) -> ObjectApiResponse[t.Any]:
4556
4666
  """
4557
- Simulate an index. Get the index configuration that would be applied to the specified
4558
- index from an existing index template.
4667
+ .. raw:: html
4668
+
4669
+ <p>Simulate an index.
4670
+ Get the index configuration that would be applied to the specified index from an existing index template.</p>
4671
+
4559
4672
 
4560
4673
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-index.html>`_
4561
4674
 
@@ -4632,8 +4745,11 @@ class IndicesClient(NamespacedClient):
4632
4745
  body: t.Optional[t.Dict[str, t.Any]] = None,
4633
4746
  ) -> ObjectApiResponse[t.Any]:
4634
4747
  """
4635
- Simulate an index template. Get the index configuration that would be applied
4636
- by a particular index template.
4748
+ .. raw:: html
4749
+
4750
+ <p>Simulate an index template.
4751
+ Get the index configuration that would be applied by a particular index template.</p>
4752
+
4637
4753
 
4638
4754
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-simulate-template.html>`_
4639
4755
 
@@ -4764,31 +4880,44 @@ class IndicesClient(NamespacedClient):
4764
4880
  body: t.Optional[t.Dict[str, t.Any]] = None,
4765
4881
  ) -> ObjectApiResponse[t.Any]:
4766
4882
  """
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.
4883
+ .. raw:: html
4884
+
4885
+ <p>Split an index.
4886
+ Split an index into a new index with more primary shards.</p>
4887
+ <ul>
4888
+ <li>
4889
+ <p>Before you can split an index:</p>
4890
+ </li>
4891
+ <li>
4892
+ <p>The index must be read-only.</p>
4893
+ </li>
4894
+ <li>
4895
+ <p>The cluster health status must be green.</p>
4896
+ </li>
4897
+ </ul>
4898
+ <p>You can do make an index read-only with the following request using the add index block API:</p>
4899
+ <pre><code>PUT /my_source_index/_block/write
4900
+ </code></pre>
4901
+ <p>The current write index on a data stream cannot be split.
4902
+ In order to split the current write index, the data stream must first be rolled over so that a new write index is created and then the previous write index can be split.</p>
4903
+ <p>The number of times the index can be split (and the number of shards that each original shard can be split into) is determined by the <code>index.number_of_routing_shards</code> setting.
4904
+ The number of routing shards specifies the hashing space that is used internally to distribute documents across shards with consistent hashing.
4905
+ For instance, a 5 shard index with <code>number_of_routing_shards</code> set to 30 (5 x 2 x 3) could be split by a factor of 2 or 3.</p>
4906
+ <p>A split operation:</p>
4907
+ <ul>
4908
+ <li>Creates a new target index with the same definition as the source index, but with a larger number of primary shards.</li>
4909
+ <li>Hard-links segments from the source index into the target index. If the file system doesn't support hard-linking, all segments are copied into the new index, which is a much more time consuming process.</li>
4910
+ <li>Hashes all documents again, after low level files are created, to delete documents that belong to a different shard.</li>
4911
+ <li>Recovers the target index as though it were a closed index which had just been re-opened.</li>
4912
+ </ul>
4913
+ <p>IMPORTANT: Indices can only be split if they satisfy the following requirements:</p>
4914
+ <ul>
4915
+ <li>The target index must not exist.</li>
4916
+ <li>The source index must have fewer primary shards than the target index.</li>
4917
+ <li>The number of primary shards in the target index must be a multiple of the number of primary shards in the source index.</li>
4918
+ <li>The node handling the split process must have sufficient free disk space to accommodate a second copy of the existing index.</li>
4919
+ </ul>
4920
+
4792
4921
 
4793
4922
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-split-index.html>`_
4794
4923
 
@@ -4880,14 +5009,17 @@ class IndicesClient(NamespacedClient):
4880
5009
  pretty: t.Optional[bool] = None,
4881
5010
  ) -> ObjectApiResponse[t.Any]:
4882
5011
  """
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.
5012
+ .. raw:: html
5013
+
5014
+ <p>Get index statistics.
5015
+ For data streams, the API retrieves statistics for the stream's backing indices.</p>
5016
+ <p>By default, the returned statistics are index-level with <code>primaries</code> and <code>total</code> aggregations.
5017
+ <code>primaries</code> are the values for only the primary shards.
5018
+ <code>total</code> are the accumulated values for both primary and replica shards.</p>
5019
+ <p>To get shard-level statistics, set the <code>level</code> parameter to <code>shards</code>.</p>
5020
+ <p>NOTE: When moving to another node, the shard-level statistics for a shard are cleared.
5021
+ Although the shard is no longer part of the node, that node retains any node-level statistics to which the shard contributed.</p>
5022
+
4891
5023
 
4892
5024
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-stats.html>`_
4893
5025
 
@@ -4990,8 +5122,11 @@ class IndicesClient(NamespacedClient):
4990
5122
  wait_for_active_shards: t.Optional[str] = None,
4991
5123
  ) -> ObjectApiResponse[t.Any]:
4992
5124
  """
4993
- Unfreeze an index. When a frozen index is unfrozen, the index goes through the
4994
- normal recovery process and becomes writeable again.
5125
+ .. raw:: html
5126
+
5127
+ <p>Unfreeze an index.
5128
+ When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.</p>
5129
+
4995
5130
 
4996
5131
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/unfreeze-index-api.html>`_
4997
5132
 
@@ -5065,7 +5200,11 @@ class IndicesClient(NamespacedClient):
5065
5200
  body: t.Optional[t.Dict[str, t.Any]] = None,
5066
5201
  ) -> ObjectApiResponse[t.Any]:
5067
5202
  """
5068
- Create or update an alias. Adds a data stream or index to an alias.
5203
+ .. raw:: html
5204
+
5205
+ <p>Create or update an alias.
5206
+ Adds a data stream or index to an alias.</p>
5207
+
5069
5208
 
5070
5209
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-aliases.html>`_
5071
5210
 
@@ -5140,7 +5279,11 @@ class IndicesClient(NamespacedClient):
5140
5279
  body: t.Optional[t.Dict[str, t.Any]] = None,
5141
5280
  ) -> ObjectApiResponse[t.Any]:
5142
5281
  """
5143
- Validate a query. Validates a query without running it.
5282
+ .. raw:: html
5283
+
5284
+ <p>Validate a query.
5285
+ Validates a query without running it.</p>
5286
+
5144
5287
 
5145
5288
  `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-validate.html>`_
5146
5289