elasticsearch 8.18.0__py3-none-any.whl → 9.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. elasticsearch/_async/client/__init__.py +62 -277
  2. elasticsearch/_async/client/_base.py +1 -1
  3. elasticsearch/_async/client/async_search.py +6 -10
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -33
  6. elasticsearch/_async/client/ccr.py +13 -13
  7. elasticsearch/_async/client/cluster.py +20 -20
  8. elasticsearch/_async/client/connector.py +44 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +5 -5
  11. elasticsearch/_async/client/eql.py +4 -4
  12. elasticsearch/_async/client/esql.py +7 -11
  13. elasticsearch/_async/client/features.py +2 -2
  14. elasticsearch/_async/client/fleet.py +18 -20
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +18 -11
  17. elasticsearch/_async/client/indices.py +75 -163
  18. elasticsearch/_async/client/inference.py +132 -25
  19. elasticsearch/_async/client/ingest.py +12 -12
  20. elasticsearch/_async/client/license.py +7 -7
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +80 -85
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +8 -8
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +8 -8
  28. elasticsearch/_async/client/search_application.py +10 -10
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +71 -68
  31. elasticsearch/_async/client/shutdown.py +3 -3
  32. elasticsearch/_async/client/simulate.py +1 -1
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +280 -130
  35. elasticsearch/_async/client/sql.py +6 -6
  36. elasticsearch/_async/client/ssl.py +1 -1
  37. elasticsearch/_async/client/synonyms.py +7 -7
  38. elasticsearch/_async/client/tasks.py +3 -3
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +11 -11
  41. elasticsearch/_async/client/watcher.py +14 -14
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_sync/client/__init__.py +62 -277
  44. elasticsearch/_sync/client/_base.py +1 -1
  45. elasticsearch/_sync/client/async_search.py +6 -10
  46. elasticsearch/_sync/client/autoscaling.py +4 -4
  47. elasticsearch/_sync/client/cat.py +26 -33
  48. elasticsearch/_sync/client/ccr.py +13 -13
  49. elasticsearch/_sync/client/cluster.py +20 -20
  50. elasticsearch/_sync/client/connector.py +44 -30
  51. elasticsearch/_sync/client/dangling_indices.py +3 -3
  52. elasticsearch/_sync/client/enrich.py +5 -5
  53. elasticsearch/_sync/client/eql.py +4 -4
  54. elasticsearch/_sync/client/esql.py +7 -11
  55. elasticsearch/_sync/client/features.py +2 -2
  56. elasticsearch/_sync/client/fleet.py +18 -20
  57. elasticsearch/_sync/client/graph.py +1 -1
  58. elasticsearch/_sync/client/ilm.py +18 -11
  59. elasticsearch/_sync/client/indices.py +75 -163
  60. elasticsearch/_sync/client/inference.py +132 -25
  61. elasticsearch/_sync/client/ingest.py +12 -12
  62. elasticsearch/_sync/client/license.py +7 -7
  63. elasticsearch/_sync/client/logstash.py +3 -3
  64. elasticsearch/_sync/client/migration.py +3 -3
  65. elasticsearch/_sync/client/ml.py +80 -85
  66. elasticsearch/_sync/client/monitoring.py +1 -1
  67. elasticsearch/_sync/client/nodes.py +8 -8
  68. elasticsearch/_sync/client/query_rules.py +8 -8
  69. elasticsearch/_sync/client/rollup.py +8 -8
  70. elasticsearch/_sync/client/search_application.py +10 -10
  71. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  72. elasticsearch/_sync/client/security.py +71 -68
  73. elasticsearch/_sync/client/shutdown.py +3 -3
  74. elasticsearch/_sync/client/simulate.py +1 -1
  75. elasticsearch/_sync/client/slm.py +9 -9
  76. elasticsearch/_sync/client/snapshot.py +280 -130
  77. elasticsearch/_sync/client/sql.py +6 -6
  78. elasticsearch/_sync/client/ssl.py +1 -1
  79. elasticsearch/_sync/client/synonyms.py +7 -7
  80. elasticsearch/_sync/client/tasks.py +3 -3
  81. elasticsearch/_sync/client/text_structure.py +4 -4
  82. elasticsearch/_sync/client/transform.py +11 -11
  83. elasticsearch/_sync/client/utils.py +0 -37
  84. elasticsearch/_sync/client/watcher.py +14 -14
  85. elasticsearch/_sync/client/xpack.py +2 -2
  86. elasticsearch/_version.py +1 -1
  87. elasticsearch/dsl/_async/search.py +7 -3
  88. elasticsearch/dsl/_sync/search.py +7 -3
  89. elasticsearch/dsl/aggs.py +11 -7
  90. elasticsearch/dsl/faceted_search_base.py +4 -4
  91. elasticsearch/dsl/field.py +139 -1
  92. elasticsearch/dsl/query.py +7 -1
  93. elasticsearch/dsl/search_base.py +16 -3
  94. elasticsearch/dsl/types.py +66 -84
  95. elasticsearch/dsl/wrappers.py +25 -0
  96. elasticsearch/exceptions.py +2 -0
  97. elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
  98. elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
  99. {elasticsearch-8.18.0.dist-info → elasticsearch-9.0.1.dist-info}/METADATA +17 -29
  100. elasticsearch-9.0.1.dist-info/RECORD +162 -0
  101. elasticsearch-9.0.1.dist-info/licenses/LICENSE.txt +175 -0
  102. elasticsearch-9.0.1.dist-info/licenses/NOTICE.txt +559 -0
  103. elasticsearch/transport.py +0 -57
  104. elasticsearch-8.18.0.dist-info/RECORD +0 -161
  105. {elasticsearch-8.18.0.dist-info → elasticsearch-9.0.1.dist-info}/WHEEL +0 -0
  106. {elasticsearch-8.18.0.dist-info → elasticsearch-9.0.1.dist-info}/licenses/LICENSE +0 -0
  107. {elasticsearch-8.18.0.dist-info → elasticsearch-9.0.1.dist-info}/licenses/NOTICE +0 -0
@@ -18,7 +18,6 @@
18
18
 
19
19
  import logging
20
20
  import typing as t
21
- import warnings
22
21
 
23
22
  from elastic_transport import (
24
23
  AsyncTransport,
@@ -181,37 +180,13 @@ class AsyncElasticsearch(BaseClient):
181
180
  t.Callable[[t.Dict[str, t.Any], NodeConfig], t.Optional[NodeConfig]]
182
181
  ] = None,
183
182
  meta_header: t.Union[DefaultType, bool] = DEFAULT,
184
- timeout: t.Union[DefaultType, None, float] = DEFAULT,
185
- randomize_hosts: t.Union[DefaultType, bool] = DEFAULT,
186
- host_info_callback: t.Optional[
187
- t.Callable[
188
- [t.Dict[str, t.Any], t.Dict[str, t.Union[str, int]]],
189
- t.Optional[t.Dict[str, t.Union[str, int]]],
190
- ]
191
- ] = None,
192
- sniffer_timeout: t.Union[DefaultType, None, float] = DEFAULT,
193
- sniff_on_connection_fail: t.Union[DefaultType, bool] = DEFAULT,
194
183
  http_auth: t.Union[DefaultType, t.Any] = DEFAULT,
195
- maxsize: t.Union[DefaultType, int] = DEFAULT,
196
184
  # Internal use only
197
185
  _transport: t.Optional[AsyncTransport] = None,
198
186
  ) -> None:
199
187
  if hosts is None and cloud_id is None and _transport is None:
200
188
  raise ValueError("Either 'hosts' or 'cloud_id' must be specified")
201
189
 
202
- if timeout is not DEFAULT:
203
- if request_timeout is not DEFAULT:
204
- raise ValueError(
205
- "Can't specify both 'timeout' and 'request_timeout', "
206
- "instead only specify 'request_timeout'"
207
- )
208
- warnings.warn(
209
- "The 'timeout' parameter is deprecated in favor of 'request_timeout'",
210
- category=DeprecationWarning,
211
- stacklevel=2,
212
- )
213
- request_timeout = timeout
214
-
215
190
  if serializer is not None:
216
191
  if serializers is not DEFAULT:
217
192
  raise ValueError(
@@ -220,58 +195,6 @@ class AsyncElasticsearch(BaseClient):
220
195
  )
221
196
  serializers = {default_mimetype: serializer}
222
197
 
223
- if randomize_hosts is not DEFAULT:
224
- if randomize_nodes_in_pool is not DEFAULT:
225
- raise ValueError(
226
- "Can't specify both 'randomize_hosts' and 'randomize_nodes_in_pool', "
227
- "instead only specify 'randomize_nodes_in_pool'"
228
- )
229
- warnings.warn(
230
- "The 'randomize_hosts' parameter is deprecated in favor of 'randomize_nodes_in_pool'",
231
- category=DeprecationWarning,
232
- stacklevel=2,
233
- )
234
- randomize_nodes_in_pool = randomize_hosts
235
-
236
- if sniffer_timeout is not DEFAULT:
237
- if min_delay_between_sniffing is not DEFAULT:
238
- raise ValueError(
239
- "Can't specify both 'sniffer_timeout' and 'min_delay_between_sniffing', "
240
- "instead only specify 'min_delay_between_sniffing'"
241
- )
242
- warnings.warn(
243
- "The 'sniffer_timeout' parameter is deprecated in favor of 'min_delay_between_sniffing'",
244
- category=DeprecationWarning,
245
- stacklevel=2,
246
- )
247
- min_delay_between_sniffing = sniffer_timeout
248
-
249
- if sniff_on_connection_fail is not DEFAULT:
250
- if sniff_on_node_failure is not DEFAULT:
251
- raise ValueError(
252
- "Can't specify both 'sniff_on_connection_fail' and 'sniff_on_node_failure', "
253
- "instead only specify 'sniff_on_node_failure'"
254
- )
255
- warnings.warn(
256
- "The 'sniff_on_connection_fail' parameter is deprecated in favor of 'sniff_on_node_failure'",
257
- category=DeprecationWarning,
258
- stacklevel=2,
259
- )
260
- sniff_on_node_failure = sniff_on_connection_fail
261
-
262
- if maxsize is not DEFAULT:
263
- if connections_per_node is not DEFAULT:
264
- raise ValueError(
265
- "Can't specify both 'maxsize' and 'connections_per_node', "
266
- "instead only specify 'connections_per_node'"
267
- )
268
- warnings.warn(
269
- "The 'maxsize' parameter is deprecated in favor of 'connections_per_node'",
270
- category=DeprecationWarning,
271
- stacklevel=2,
272
- )
273
- connections_per_node = maxsize
274
-
275
198
  # Setting min_delay_between_sniffing=True implies sniff_before_requests=True
276
199
  if min_delay_between_sniffing is not DEFAULT:
277
200
  sniff_before_requests = True
@@ -293,22 +216,7 @@ class AsyncElasticsearch(BaseClient):
293
216
  )
294
217
 
295
218
  sniff_callback = None
296
- if host_info_callback is not None:
297
- if sniffed_node_callback is not None:
298
- raise ValueError(
299
- "Can't specify both 'host_info_callback' and 'sniffed_node_callback', "
300
- "instead only specify 'sniffed_node_callback'"
301
- )
302
- warnings.warn(
303
- "The 'host_info_callback' parameter is deprecated in favor of 'sniffed_node_callback'",
304
- category=DeprecationWarning,
305
- stacklevel=2,
306
- )
307
-
308
- sniff_callback = create_sniff_callback(
309
- host_info_callback=host_info_callback
310
- )
311
- elif sniffed_node_callback is not None:
219
+ if sniffed_node_callback is not None:
312
220
  sniff_callback = create_sniff_callback(
313
221
  sniffed_node_callback=sniffed_node_callback
314
222
  )
@@ -731,7 +639,7 @@ class AsyncElasticsearch(BaseClient):
731
639
  The other two shards that make up the index do not participate in the <code>_bulk</code> request at all.</p>
732
640
 
733
641
 
734
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-bulk.html>`_
642
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-bulk>`_
735
643
 
736
644
  :param operations:
737
645
  :param index: The name of the data stream, index, or index alias to perform bulk
@@ -856,7 +764,7 @@ class AsyncElasticsearch(BaseClient):
856
764
  Clear the search context and results for a scrolling search.</p>
857
765
 
858
766
 
859
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-scroll-api.html>`_
767
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-clear-scroll>`_
860
768
 
861
769
  :param scroll_id: The scroll IDs to clear. To clear all scroll IDs, use `_all`.
862
770
  """
@@ -913,7 +821,7 @@ class AsyncElasticsearch(BaseClient):
913
821
  However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>
914
822
 
915
823
 
916
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html>`_
824
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-open-point-in-time>`_
917
825
 
918
826
  :param id: The ID of the point-in-time.
919
827
  """
@@ -997,7 +905,7 @@ class AsyncElasticsearch(BaseClient):
997
905
  This means that replicas increase the scalability of the count.</p>
998
906
 
999
907
 
1000
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-count.html>`_
908
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-count>`_
1001
909
 
1002
910
  :param index: A comma-separated list of data streams, indices, and aliases to
1003
911
  search. It supports wildcards (`*`). To search all data streams and indices,
@@ -1199,7 +1107,7 @@ class AsyncElasticsearch(BaseClient):
1199
1107
  The <code>_shards</code> section of the API response reveals the number of shard copies on which replication succeeded and failed.</p>
1200
1108
 
1201
1109
 
1202
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html>`_
1110
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-create>`_
1203
1111
 
1204
1112
  :param index: The name of the data stream or index to target. If the target doesn't
1205
1113
  exist and matches the name or wildcard (`*`) pattern of an index template
@@ -1366,7 +1274,7 @@ class AsyncElasticsearch(BaseClient):
1366
1274
  It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.</p>
1367
1275
 
1368
1276
 
1369
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete.html>`_
1277
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete>`_
1370
1278
 
1371
1279
  :param index: The name of the target index.
1372
1280
  :param id: A unique identifier for the document.
@@ -1555,7 +1463,7 @@ class AsyncElasticsearch(BaseClient):
1555
1463
  The get task status API will continue to list the delete by query task until this task checks that it has been cancelled and terminates itself.</p>
1556
1464
 
1557
1465
 
1558
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html>`_
1466
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-by-query>`_
1559
1467
 
1560
1468
  :param index: A comma-separated list of data streams, indices, and aliases to
1561
1469
  search. It supports wildcards (`*`). To search all data streams or indices,
@@ -1752,7 +1660,7 @@ class AsyncElasticsearch(BaseClient):
1752
1660
  Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.</p>
1753
1661
 
1754
1662
 
1755
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html#docs-delete-by-query-rethrottle>`_
1663
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-by-query-rethrottle>`_
1756
1664
 
1757
1665
  :param task_id: The ID for the task.
1758
1666
  :param requests_per_second: The throttle for this request in sub-requests per
@@ -1802,7 +1710,7 @@ class AsyncElasticsearch(BaseClient):
1802
1710
  Deletes a stored script or search template.</p>
1803
1711
 
1804
1712
 
1805
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-stored-script-api.html>`_
1713
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-delete-script>`_
1806
1714
 
1807
1715
  :param id: The identifier for the stored script or search template.
1808
1716
  :param master_timeout: The period to wait for a connection to the master node.
@@ -1886,7 +1794,7 @@ class AsyncElasticsearch(BaseClient):
1886
1794
  Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
1887
1795
 
1888
1796
 
1889
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
1797
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
1890
1798
 
1891
1799
  :param index: A comma-separated list of data streams, indices, and aliases. It
1892
1800
  supports wildcards (`*`).
@@ -2009,7 +1917,7 @@ class AsyncElasticsearch(BaseClient):
2009
1917
  <p>A document's source is not available if it is disabled in the mapping.</p>
2010
1918
 
2011
1919
 
2012
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
1920
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
2013
1921
 
2014
1922
  :param index: A comma-separated list of data streams, indices, and aliases. It
2015
1923
  supports wildcards (`*`).
@@ -2115,7 +2023,7 @@ class AsyncElasticsearch(BaseClient):
2115
2023
  It computes a score explanation for a query and a specific document.</p>
2116
2024
 
2117
2025
 
2118
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-explain.html>`_
2026
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-explain>`_
2119
2027
 
2120
2028
  :param index: Index names that are used to limit the request. Only a single index
2121
2029
  name can be provided to this parameter.
@@ -2250,7 +2158,7 @@ class AsyncElasticsearch(BaseClient):
2250
2158
  For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the <code>keyword</code> family.</p>
2251
2159
 
2252
2160
 
2253
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-field-caps.html>`_
2161
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-field-caps>`_
2254
2162
 
2255
2163
  :param index: A comma-separated list of data streams, indices, and aliases used
2256
2164
  to limit the request. Supports wildcards (*). To target all data streams
@@ -2411,7 +2319,7 @@ class AsyncElasticsearch(BaseClient):
2411
2319
  Elasticsearch cleans up deleted documents in the background as you continue to index more data.</p>
2412
2320
 
2413
2321
 
2414
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
2322
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
2415
2323
 
2416
2324
  :param index: The name of the index that contains the document.
2417
2325
  :param id: A unique document identifier.
@@ -2518,7 +2426,7 @@ class AsyncElasticsearch(BaseClient):
2518
2426
  Retrieves a stored script or search template.</p>
2519
2427
 
2520
2428
 
2521
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-stored-script-api.html>`_
2429
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get-script>`_
2522
2430
 
2523
2431
  :param id: The identifier for the stored script or search template.
2524
2432
  :param master_timeout: The period to wait for the master node. If the master
@@ -2567,7 +2475,7 @@ class AsyncElasticsearch(BaseClient):
2567
2475
  <p>Get a list of supported script contexts and their methods.</p>
2568
2476
 
2569
2477
 
2570
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-contexts-api.html>`_
2478
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get-script-context>`_
2571
2479
  """
2572
2480
  __path_parts: t.Dict[str, str] = {}
2573
2481
  __path = "/_script_context"
@@ -2606,7 +2514,7 @@ class AsyncElasticsearch(BaseClient):
2606
2514
  <p>Get a list of available script types, languages, and contexts.</p>
2607
2515
 
2608
2516
 
2609
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-script-languages-api.html>`_
2517
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get-script-languages>`_
2610
2518
  """
2611
2519
  __path_parts: t.Dict[str, str] = {}
2612
2520
  __path = "/_script_language"
@@ -2671,7 +2579,7 @@ class AsyncElasticsearch(BaseClient):
2671
2579
  </code></pre>
2672
2580
 
2673
2581
 
2674
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html>`_
2582
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-get>`_
2675
2583
 
2676
2584
  :param index: The name of the index that contains the document.
2677
2585
  :param id: A unique document identifier.
@@ -2771,7 +2679,7 @@ class AsyncElasticsearch(BaseClient):
2771
2679
  When setting up automated polling of the API for health status, set verbose to false to disable the more expensive analysis logic.</p>
2772
2680
 
2773
2681
 
2774
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/health-api.html>`_
2682
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-health-report>`_
2775
2683
 
2776
2684
  :param feature: A feature of the cluster, as returned by the top-level health
2777
2685
  report API.
@@ -2936,7 +2844,7 @@ class AsyncElasticsearch(BaseClient):
2936
2844
  </code></pre>
2937
2845
 
2938
2846
 
2939
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html>`_
2847
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-create>`_
2940
2848
 
2941
2849
  :param index: The name of the data stream or index to target. If the target doesn't
2942
2850
  exist and matches the name or wildcard (`*`) pattern of an index template
@@ -3068,7 +2976,7 @@ class AsyncElasticsearch(BaseClient):
3068
2976
  Get basic build, version, and cluster information.</p>
3069
2977
 
3070
2978
 
3071
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/rest-api-root.html>`_
2979
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-info>`_
3072
2980
  """
3073
2981
  __path_parts: t.Dict[str, str] = {}
3074
2982
  __path = "/"
@@ -3091,127 +2999,6 @@ class AsyncElasticsearch(BaseClient):
3091
2999
  path_parts=__path_parts,
3092
3000
  )
3093
3001
 
3094
- @_rewrite_parameters(
3095
- body_fields=(
3096
- "knn",
3097
- "docvalue_fields",
3098
- "fields",
3099
- "filter",
3100
- "source",
3101
- "stored_fields",
3102
- ),
3103
- parameter_aliases={"_source": "source"},
3104
- )
3105
- @_stability_warning(Stability.EXPERIMENTAL)
3106
- async def knn_search(
3107
- self,
3108
- *,
3109
- index: t.Union[str, t.Sequence[str]],
3110
- knn: t.Optional[t.Mapping[str, t.Any]] = None,
3111
- docvalue_fields: t.Optional[t.Sequence[t.Mapping[str, t.Any]]] = None,
3112
- error_trace: t.Optional[bool] = None,
3113
- fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3114
- filter: t.Optional[
3115
- t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
3116
- ] = None,
3117
- filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3118
- human: t.Optional[bool] = None,
3119
- pretty: t.Optional[bool] = None,
3120
- routing: t.Optional[str] = None,
3121
- source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
3122
- stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
3123
- body: t.Optional[t.Dict[str, t.Any]] = None,
3124
- ) -> ObjectApiResponse[t.Any]:
3125
- """
3126
- .. raw:: html
3127
-
3128
- <p>Run a knn search.</p>
3129
- <p>NOTE: The kNN search API has been replaced by the <code>knn</code> option in the search API.</p>
3130
- <p>Perform a k-nearest neighbor (kNN) search on a dense_vector field and return the matching documents.
3131
- Given a query vector, the API finds the k closest vectors and returns those documents as search hits.</p>
3132
- <p>Elasticsearch uses the HNSW algorithm to support efficient kNN search.
3133
- Like most kNN algorithms, HNSW is an approximate method that sacrifices result accuracy for improved search speed.
3134
- This means the results returned are not always the true k closest neighbors.</p>
3135
- <p>The kNN search API supports restricting the search using a filter.
3136
- The search will return the top k documents that also match the filter query.</p>
3137
- <p>A kNN search response has the exact same structure as a search API response.
3138
- However, certain sections have a meaning specific to kNN search:</p>
3139
- <ul>
3140
- <li>The document <code>_score</code> is determined by the similarity between the query and document vector.</li>
3141
- <li>The <code>hits.total</code> object contains the total number of nearest neighbor candidates considered, which is <code>num_candidates * num_shards</code>. The <code>hits.total.relation</code> will always be <code>eq</code>, indicating an exact value.</li>
3142
- </ul>
3143
-
3144
-
3145
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/knn-search-api.html>`_
3146
-
3147
- :param index: A comma-separated list of index names to search; use `_all` or
3148
- to perform the operation on all indices.
3149
- :param knn: The kNN query to run.
3150
- :param docvalue_fields: The request returns doc values for field names matching
3151
- these patterns in the `hits.fields` property of the response. It accepts
3152
- wildcard (`*`) patterns.
3153
- :param fields: The request returns values for field names matching these patterns
3154
- in the `hits.fields` property of the response. It accepts wildcard (`*`)
3155
- patterns.
3156
- :param filter: A query to filter the documents that can match. The kNN search
3157
- will return the top `k` documents that also match this filter. The value
3158
- can be a single query or a list of queries. If `filter` isn't provided, all
3159
- documents are allowed to match.
3160
- :param routing: A comma-separated list of specific routing values.
3161
- :param source: Indicates which source fields are returned for matching documents.
3162
- These fields are returned in the `hits._source` property of the search response.
3163
- :param stored_fields: A list of stored fields to return as part of a hit. If
3164
- no fields are specified, no stored fields are included in the response. If
3165
- this field is specified, the `_source` parameter defaults to `false`. You
3166
- can pass `_source: true` to return both source fields and stored fields in
3167
- the search response.
3168
- """
3169
- if index in SKIP_IN_PATH:
3170
- raise ValueError("Empty value passed for parameter 'index'")
3171
- if knn is None and body is None:
3172
- raise ValueError("Empty value passed for parameter 'knn'")
3173
- __path_parts: t.Dict[str, str] = {"index": _quote(index)}
3174
- __path = f'/{__path_parts["index"]}/_knn_search'
3175
- __query: t.Dict[str, t.Any] = {}
3176
- __body: t.Dict[str, t.Any] = body if body is not None else {}
3177
- if error_trace is not None:
3178
- __query["error_trace"] = error_trace
3179
- if filter_path is not None:
3180
- __query["filter_path"] = filter_path
3181
- if human is not None:
3182
- __query["human"] = human
3183
- if pretty is not None:
3184
- __query["pretty"] = pretty
3185
- if routing is not None:
3186
- __query["routing"] = routing
3187
- if not __body:
3188
- if knn is not None:
3189
- __body["knn"] = knn
3190
- if docvalue_fields is not None:
3191
- __body["docvalue_fields"] = docvalue_fields
3192
- if fields is not None:
3193
- __body["fields"] = fields
3194
- if filter is not None:
3195
- __body["filter"] = filter
3196
- if source is not None:
3197
- __body["_source"] = source
3198
- if stored_fields is not None:
3199
- __body["stored_fields"] = stored_fields
3200
- if not __body:
3201
- __body = None # type: ignore[assignment]
3202
- __headers = {"accept": "application/json"}
3203
- if __body is not None:
3204
- __headers["content-type"] = "application/json"
3205
- return await self.perform_request( # type: ignore[return-value]
3206
- "POST",
3207
- __path,
3208
- params=__query,
3209
- headers=__headers,
3210
- body=__body,
3211
- endpoint_id="knn_search",
3212
- path_parts=__path_parts,
3213
- )
3214
-
3215
3002
  @_rewrite_parameters(
3216
3003
  body_fields=("docs", "ids"),
3217
3004
  parameter_aliases={
@@ -3258,7 +3045,7 @@ class AsyncElasticsearch(BaseClient):
3258
3045
  You can include the <code>stored_fields</code> query parameter in the request URI to specify the defaults to use when there are no per-document instructions.</p>
3259
3046
 
3260
3047
 
3261
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-get.html>`_
3048
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-mget>`_
3262
3049
 
3263
3050
  :param index: Name of the index to retrieve documents from when `ids` are specified,
3264
3051
  or when a document in the `docs` array does not specify an index.
@@ -3393,7 +3180,7 @@ class AsyncElasticsearch(BaseClient):
3393
3180
  When sending requests to this endpoint the <code>Content-Type</code> header should be set to <code>application/x-ndjson</code>.</p>
3394
3181
 
3395
3182
 
3396
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-multi-search.html>`_
3183
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-msearch>`_
3397
3184
 
3398
3185
  :param searches:
3399
3186
  :param index: Comma-separated list of data streams, indices, and index aliases
@@ -3420,7 +3207,8 @@ class AsyncElasticsearch(BaseClient):
3420
3207
  computationally expensive named queries on a large number of hits may add
3421
3208
  significant overhead.
3422
3209
  :param max_concurrent_searches: Maximum number of concurrent searches the multi
3423
- search API can execute.
3210
+ search API can execute. Defaults to `max(1, (# of data nodes * min(search
3211
+ thread pool size, 10)))`.
3424
3212
  :param max_concurrent_shard_requests: Maximum number of concurrent shard requests
3425
3213
  that each sub-search request executes per node.
3426
3214
  :param pre_filter_shard_size: Defines a threshold that enforces a pre-filter
@@ -3539,7 +3327,7 @@ class AsyncElasticsearch(BaseClient):
3539
3327
  </code></pre>
3540
3328
 
3541
3329
 
3542
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/multi-search-template.html>`_
3330
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-msearch-template>`_
3543
3331
 
3544
3332
  :param search_templates:
3545
3333
  :param index: A comma-separated list of data streams, indices, and aliases to
@@ -3644,7 +3432,7 @@ class AsyncElasticsearch(BaseClient):
3644
3432
  The mapping used is determined by the specified <code>_index</code>.</p>
3645
3433
 
3646
3434
 
3647
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-multi-termvectors.html>`_
3435
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-mtermvectors>`_
3648
3436
 
3649
3437
  :param index: The name of the index that contains the documents.
3650
3438
  :param docs: An array of existing or artificial documents.
@@ -3785,7 +3573,7 @@ class AsyncElasticsearch(BaseClient):
3785
3573
  You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.</p>
3786
3574
 
3787
3575
 
3788
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html>`_
3576
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-open-point-in-time>`_
3789
3577
 
3790
3578
  :param index: A comma-separated list of index names to open point in time; use
3791
3579
  `_all` or empty string to perform the operation on all indices
@@ -3883,7 +3671,7 @@ class AsyncElasticsearch(BaseClient):
3883
3671
  Creates or updates a stored script or search template.</p>
3884
3672
 
3885
3673
 
3886
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-stored-script-api.html>`_
3674
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-put-script>`_
3887
3675
 
3888
3676
  :param id: The identifier for the stored script or search template. It must be
3889
3677
  unique within the cluster.
@@ -3973,7 +3761,7 @@ class AsyncElasticsearch(BaseClient):
3973
3761
  <p>Evaluate the quality of ranked search results over a set of typical search queries.</p>
3974
3762
 
3975
3763
 
3976
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-rank-eval.html>`_
3764
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-rank-eval>`_
3977
3765
 
3978
3766
  :param requests: A set of typical search requests, together with their provided
3979
3767
  ratings.
@@ -4205,7 +3993,7 @@ class AsyncElasticsearch(BaseClient):
4205
3993
  It is not possible to configure SSL in the body of the reindex request.</p>
4206
3994
 
4207
3995
 
4208
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html>`_
3996
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex>`_
4209
3997
 
4210
3998
  :param dest: The destination you are copying to.
4211
3999
  :param source: The source you are copying from.
@@ -4329,7 +4117,7 @@ class AsyncElasticsearch(BaseClient):
4329
4117
  This behavior prevents scroll timeouts.</p>
4330
4118
 
4331
4119
 
4332
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html>`_
4120
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-reindex>`_
4333
4121
 
4334
4122
  :param task_id: The task identifier, which can be found by using the tasks API.
4335
4123
  :param requests_per_second: The throttle for this request in sub-requests per
@@ -4375,7 +4163,7 @@ class AsyncElasticsearch(BaseClient):
4375
4163
  human: t.Optional[bool] = None,
4376
4164
  params: t.Optional[t.Mapping[str, t.Any]] = None,
4377
4165
  pretty: t.Optional[bool] = None,
4378
- source: t.Optional[str] = None,
4166
+ source: t.Optional[t.Union[str, t.Mapping[str, t.Any]]] = None,
4379
4167
  body: t.Optional[t.Dict[str, t.Any]] = None,
4380
4168
  ) -> ObjectApiResponse[t.Any]:
4381
4169
  """
@@ -4385,7 +4173,7 @@ class AsyncElasticsearch(BaseClient):
4385
4173
  <p>Render a search template as a search request body.</p>
4386
4174
 
4387
4175
 
4388
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/render-search-template-api.html>`_
4176
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-render-search-template>`_
4389
4177
 
4390
4178
  :param id: The ID of the search template to render. If no `source` is specified,
4391
4179
  this or the `id` request body parameter is required.
@@ -4479,7 +4267,7 @@ class AsyncElasticsearch(BaseClient):
4479
4267
  <p>Each context requires a script, but additional parameters depend on the context you're using for that script.</p>
4480
4268
 
4481
4269
 
4482
- `<https://www.elastic.co/guide/en/elasticsearch/painless/8.18/painless-execute-api.html>`_
4270
+ `<https://www.elastic.co/docs/reference/scripting-languages/painless/painless-api-examples>`_
4483
4271
 
4484
4272
  :param context: The context that the script should run in. NOTE: Result ordering
4485
4273
  in the field contexts is not guaranteed.
@@ -4552,7 +4340,7 @@ class AsyncElasticsearch(BaseClient):
4552
4340
  <p>IMPORTANT: Results from a scrolling search reflect the state of the index at the time of the initial search request. Subsequent indexing or document changes only affect later search and scroll requests.</p>
4553
4341
 
4554
4342
 
4555
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/scroll-api.html>`_
4343
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-scroll>`_
4556
4344
 
4557
4345
  :param scroll_id: The scroll ID of the search.
4558
4346
  :param rest_total_hits_as_int: If true, the API response’s hit.total property
@@ -4683,7 +4471,6 @@ class AsyncElasticsearch(BaseClient):
4683
4471
  ] = None,
4684
4472
  lenient: t.Optional[bool] = None,
4685
4473
  max_concurrent_shard_requests: t.Optional[int] = None,
4686
- min_compatible_shard_node: t.Optional[str] = None,
4687
4474
  min_score: t.Optional[float] = None,
4688
4475
  pit: t.Optional[t.Mapping[str, t.Any]] = None,
4689
4476
  post_filter: t.Optional[t.Mapping[str, t.Any]] = None,
@@ -4705,7 +4492,7 @@ class AsyncElasticsearch(BaseClient):
4705
4492
  script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
4706
4493
  scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
4707
4494
  search_after: t.Optional[
4708
- t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
4495
+ t.Sequence[t.Union[None, bool, float, int, str]]
4709
4496
  ] = None,
4710
4497
  search_type: t.Optional[
4711
4498
  t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
@@ -4758,7 +4545,7 @@ class AsyncElasticsearch(BaseClient):
4758
4545
  This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.</p>
4759
4546
 
4760
4547
 
4761
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-search.html>`_
4548
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search>`_
4762
4549
 
4763
4550
  :param index: A comma-separated list of data streams, indices, and aliases to
4764
4551
  search. It supports wildcards (`*`). To search all data streams and indices,
@@ -4836,10 +4623,9 @@ class AsyncElasticsearch(BaseClient):
4836
4623
  per node that the search runs concurrently. This value should be used to
4837
4624
  limit the impact of the search on the cluster in order to limit the number
4838
4625
  of concurrent shard requests.
4839
- :param min_compatible_shard_node: The minimum version of the node that can handle
4840
- the request Any handling node with a lower version will fail the request.
4841
4626
  :param min_score: The minimum `_score` for matching documents. Documents with
4842
- a lower `_score` are not included in the search results.
4627
+ a lower `_score` are not included in search results and results collected
4628
+ by aggregations.
4843
4629
  :param pit: Limit the search to a point in time (PIT). If you provide a PIT,
4844
4630
  you cannot specify an `<index>` in the request path.
4845
4631
  :param post_filter: Use the `post_filter` parameter to filter search results.
@@ -4858,18 +4644,19 @@ class AsyncElasticsearch(BaseClient):
4858
4644
  :param preference: The nodes and shards used for the search. By default, Elasticsearch
4859
4645
  selects from eligible nodes and shards using adaptive replica selection,
4860
4646
  accounting for allocation awareness. Valid values are: * `_only_local` to
4861
- run the search only on shards on the local node; * `_local` to, if possible,
4647
+ run the search only on shards on the local node. * `_local` to, if possible,
4862
4648
  run the search on shards on the local node, or if not, select shards using
4863
- the default method; * `_only_nodes:<node-id>,<node-id>` to run the search
4864
- on only the specified nodes IDs, where, if suitable shards exist on more
4865
- than one selected node, use shards on those nodes using the default method,
4866
- or if none of the specified nodes are available, select shards from any available
4867
- node using the default method; * `_prefer_nodes:<node-id>,<node-id>` to if
4868
- possible, run the search on the specified nodes IDs, or if not, select shards
4869
- using the default method; * `_shards:<shard>,<shard>` to run the search only
4870
- on the specified shards; * `<custom-string>` (any string that does not start
4871
- with `_`) to route searches with the same `<custom-string>` to the same shards
4872
- in the same order.
4649
+ the default method. * `_only_nodes:<node-id>,<node-id>` to run the search
4650
+ on only the specified nodes IDs. If suitable shards exist on more than one
4651
+ selected node, use shards on those nodes using the default method. If none
4652
+ of the specified nodes are available, select shards from any available node
4653
+ using the default method. * `_prefer_nodes:<node-id>,<node-id>` to if possible,
4654
+ run the search on the specified nodes IDs. If not, select shards using the
4655
+ default method. `_shards:<shard>,<shard>` to run the search only on the specified
4656
+ shards. You can combine this value with other `preference` values. However,
4657
+ the `_shards` value must come first. For example: `_shards:2,3|_local`. `<custom-string>`
4658
+ (any string that does not start with `_`) to route searches with the same
4659
+ `<custom-string>` to the same shards in the same order.
4873
4660
  :param profile: Set to `true` to return detailed timing information about the
4874
4661
  execution of individual components in a search request. NOTE: This is a debugging
4875
4662
  tool and adds significant overhead to search execution.
@@ -5020,8 +4807,6 @@ class AsyncElasticsearch(BaseClient):
5020
4807
  __query["lenient"] = lenient
5021
4808
  if max_concurrent_shard_requests is not None:
5022
4809
  __query["max_concurrent_shard_requests"] = max_concurrent_shard_requests
5023
- if min_compatible_shard_node is not None:
5024
- __query["min_compatible_shard_node"] = min_compatible_shard_node
5025
4810
  if pre_filter_shard_size is not None:
5026
4811
  __query["pre_filter_shard_size"] = pre_filter_shard_size
5027
4812
  if preference is not None:
@@ -5508,7 +5293,7 @@ class AsyncElasticsearch(BaseClient):
5508
5293
  Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density.</p>
5509
5294
 
5510
5295
 
5511
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-vector-tile-api.html>`_
5296
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search-mvt>`_
5512
5297
 
5513
5298
  :param index: Comma-separated list of data streams, indices, or aliases to search
5514
5299
  :param field: Field containing geospatial data to return
@@ -5682,7 +5467,7 @@ class AsyncElasticsearch(BaseClient):
5682
5467
  <p>If the Elasticsearch security features are enabled, you must have the <code>view_index_metadata</code> or <code>manage</code> index privilege for the target data stream, index, or alias.</p>
5683
5468
 
5684
5469
 
5685
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-shards.html>`_
5470
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search-shards>`_
5686
5471
 
5687
5472
  :param index: A comma-separated list of data streams, indices, and aliases to
5688
5473
  search. It supports wildcards (`*`). To search all data streams and indices,
@@ -5783,7 +5568,7 @@ class AsyncElasticsearch(BaseClient):
5783
5568
  search_type: t.Optional[
5784
5569
  t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
5785
5570
  ] = None,
5786
- source: t.Optional[str] = None,
5571
+ source: t.Optional[t.Union[str, t.Mapping[str, t.Any]]] = None,
5787
5572
  typed_keys: t.Optional[bool] = None,
5788
5573
  body: t.Optional[t.Dict[str, t.Any]] = None,
5789
5574
  ) -> ObjectApiResponse[t.Any]:
@@ -5793,7 +5578,7 @@ class AsyncElasticsearch(BaseClient):
5793
5578
  <p>Run a search with a search template.</p>
5794
5579
 
5795
5580
 
5796
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-template-api.html>`_
5581
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-search-template>`_
5797
5582
 
5798
5583
  :param index: A comma-separated list of data streams, indices, and aliases to
5799
5584
  search. It supports wildcards (`*`).
@@ -5936,7 +5721,7 @@ class AsyncElasticsearch(BaseClient):
5936
5721
  </blockquote>
5937
5722
 
5938
5723
 
5939
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-terms-enum.html>`_
5724
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-terms-enum>`_
5940
5725
 
5941
5726
  :param index: A comma-separated list of data streams, indices, and index aliases
5942
5727
  to search. Wildcard (`*`) expressions are supported. To search all data streams
@@ -6085,7 +5870,7 @@ class AsyncElasticsearch(BaseClient):
6085
5870
  Use <code>routing</code> only to hit a particular shard.</p>
6086
5871
 
6087
5872
 
6088
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-termvectors.html>`_
5873
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-termvectors>`_
6089
5874
 
6090
5875
  :param index: The name of the index that contains the document.
6091
5876
  :param id: A unique identifier for the document.
@@ -6256,7 +6041,7 @@ class AsyncElasticsearch(BaseClient):
6256
6041
  In addition to <code>_source</code>, you can access the following variables through the <code>ctx</code> map: <code>_index</code>, <code>_type</code>, <code>_id</code>, <code>_version</code>, <code>_routing</code>, and <code>_now</code> (the current timestamp).</p>
6257
6042
 
6258
6043
 
6259
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html>`_
6044
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update>`_
6260
6045
 
6261
6046
  :param index: The name of the target index. By default, the index is created
6262
6047
  automatically if it doesn't exist.
@@ -6494,7 +6279,7 @@ class AsyncElasticsearch(BaseClient):
6494
6279
  This API enables you to only modify the source of matching documents; you cannot move them.</p>
6495
6280
 
6496
6281
 
6497
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html>`_
6282
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query>`_
6498
6283
 
6499
6284
  :param index: A comma-separated list of data streams, indices, and aliases to
6500
6285
  search. It supports wildcards (`*`). To search all data streams or indices,
@@ -6714,7 +6499,7 @@ class AsyncElasticsearch(BaseClient):
6714
6499
  Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.</p>
6715
6500
 
6716
6501
 
6717
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update-by-query.html#docs-update-by-query-rethrottle>`_
6502
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query-rethrottle>`_
6718
6503
 
6719
6504
  :param task_id: The ID for the task.
6720
6505
  :param requests_per_second: The throttle for this request in sub-requests per