elasticsearch 8.17.1__py3-none-any.whl → 9.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. elasticsearch/__init__.py +2 -2
  2. elasticsearch/_async/client/__init__.py +2125 -1053
  3. elasticsearch/_async/client/_base.py +1 -2
  4. elasticsearch/_async/client/async_search.py +46 -35
  5. elasticsearch/_async/client/autoscaling.py +32 -26
  6. elasticsearch/_async/client/cat.py +244 -176
  7. elasticsearch/_async/client/ccr.py +268 -128
  8. elasticsearch/_async/client/cluster.py +191 -164
  9. elasticsearch/_async/client/connector.py +226 -116
  10. elasticsearch/_async/client/dangling_indices.py +22 -16
  11. elasticsearch/_async/client/enrich.py +51 -11
  12. elasticsearch/_async/client/eql.py +54 -13
  13. elasticsearch/_async/client/esql.py +351 -7
  14. elasticsearch/_async/client/features.py +37 -27
  15. elasticsearch/_async/client/fleet.py +32 -22
  16. elasticsearch/_async/client/graph.py +10 -9
  17. elasticsearch/_async/client/ilm.py +115 -77
  18. elasticsearch/_async/client/indices.py +1119 -772
  19. elasticsearch/_async/client/inference.py +1933 -84
  20. elasticsearch/_async/client/ingest.py +83 -50
  21. elasticsearch/_async/client/license.py +90 -38
  22. elasticsearch/_async/client/logstash.py +20 -9
  23. elasticsearch/_async/client/migration.py +26 -17
  24. elasticsearch/_async/client/ml.py +646 -374
  25. elasticsearch/_async/client/monitoring.py +6 -3
  26. elasticsearch/_async/client/nodes.py +52 -54
  27. elasticsearch/_async/client/query_rules.py +59 -33
  28. elasticsearch/_async/client/rollup.py +124 -86
  29. elasticsearch/_async/client/search_application.py +60 -32
  30. elasticsearch/_async/client/searchable_snapshots.py +25 -12
  31. elasticsearch/_async/client/security.py +903 -562
  32. elasticsearch/_async/client/shutdown.py +34 -36
  33. elasticsearch/_async/client/simulate.py +22 -28
  34. elasticsearch/_async/client/slm.py +65 -40
  35. elasticsearch/_async/client/snapshot.py +454 -327
  36. elasticsearch/_async/client/sql.py +43 -22
  37. elasticsearch/_async/client/ssl.py +17 -18
  38. elasticsearch/_async/client/synonyms.py +58 -37
  39. elasticsearch/_async/client/tasks.py +77 -48
  40. elasticsearch/_async/client/text_structure.py +65 -56
  41. elasticsearch/_async/client/transform.py +124 -93
  42. elasticsearch/_async/client/watcher.py +117 -73
  43. elasticsearch/_async/client/xpack.py +18 -9
  44. elasticsearch/_async/helpers.py +1 -2
  45. elasticsearch/_sync/client/__init__.py +2125 -1053
  46. elasticsearch/_sync/client/_base.py +1 -2
  47. elasticsearch/_sync/client/async_search.py +46 -35
  48. elasticsearch/_sync/client/autoscaling.py +32 -26
  49. elasticsearch/_sync/client/cat.py +244 -176
  50. elasticsearch/_sync/client/ccr.py +268 -128
  51. elasticsearch/_sync/client/cluster.py +191 -164
  52. elasticsearch/_sync/client/connector.py +226 -116
  53. elasticsearch/_sync/client/dangling_indices.py +22 -16
  54. elasticsearch/_sync/client/enrich.py +51 -11
  55. elasticsearch/_sync/client/eql.py +54 -13
  56. elasticsearch/_sync/client/esql.py +351 -7
  57. elasticsearch/_sync/client/features.py +37 -27
  58. elasticsearch/_sync/client/fleet.py +32 -22
  59. elasticsearch/_sync/client/graph.py +10 -9
  60. elasticsearch/_sync/client/ilm.py +115 -77
  61. elasticsearch/_sync/client/indices.py +1119 -772
  62. elasticsearch/_sync/client/inference.py +1933 -84
  63. elasticsearch/_sync/client/ingest.py +83 -50
  64. elasticsearch/_sync/client/license.py +90 -38
  65. elasticsearch/_sync/client/logstash.py +20 -9
  66. elasticsearch/_sync/client/migration.py +26 -17
  67. elasticsearch/_sync/client/ml.py +646 -374
  68. elasticsearch/_sync/client/monitoring.py +6 -3
  69. elasticsearch/_sync/client/nodes.py +52 -54
  70. elasticsearch/_sync/client/query_rules.py +59 -33
  71. elasticsearch/_sync/client/rollup.py +124 -86
  72. elasticsearch/_sync/client/search_application.py +60 -32
  73. elasticsearch/_sync/client/searchable_snapshots.py +25 -12
  74. elasticsearch/_sync/client/security.py +903 -562
  75. elasticsearch/_sync/client/shutdown.py +34 -36
  76. elasticsearch/_sync/client/simulate.py +22 -28
  77. elasticsearch/_sync/client/slm.py +65 -40
  78. elasticsearch/_sync/client/snapshot.py +454 -327
  79. elasticsearch/_sync/client/sql.py +43 -22
  80. elasticsearch/_sync/client/ssl.py +17 -18
  81. elasticsearch/_sync/client/synonyms.py +58 -37
  82. elasticsearch/_sync/client/tasks.py +77 -48
  83. elasticsearch/_sync/client/text_structure.py +65 -56
  84. elasticsearch/_sync/client/transform.py +124 -93
  85. elasticsearch/_sync/client/utils.py +1 -41
  86. elasticsearch/_sync/client/watcher.py +117 -73
  87. elasticsearch/_sync/client/xpack.py +18 -9
  88. elasticsearch/_version.py +1 -1
  89. elasticsearch/client.py +2 -0
  90. elasticsearch/dsl/__init__.py +203 -0
  91. elasticsearch/dsl/_async/__init__.py +16 -0
  92. elasticsearch/dsl/_async/document.py +522 -0
  93. elasticsearch/dsl/_async/faceted_search.py +50 -0
  94. elasticsearch/dsl/_async/index.py +639 -0
  95. elasticsearch/dsl/_async/mapping.py +49 -0
  96. elasticsearch/dsl/_async/search.py +237 -0
  97. elasticsearch/dsl/_async/update_by_query.py +47 -0
  98. elasticsearch/dsl/_sync/__init__.py +16 -0
  99. elasticsearch/dsl/_sync/document.py +514 -0
  100. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  101. elasticsearch/dsl/_sync/index.py +597 -0
  102. elasticsearch/dsl/_sync/mapping.py +49 -0
  103. elasticsearch/dsl/_sync/search.py +230 -0
  104. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  105. elasticsearch/dsl/aggs.py +3734 -0
  106. elasticsearch/dsl/analysis.py +341 -0
  107. elasticsearch/dsl/async_connections.py +37 -0
  108. elasticsearch/dsl/connections.py +142 -0
  109. elasticsearch/dsl/document.py +20 -0
  110. elasticsearch/dsl/document_base.py +444 -0
  111. elasticsearch/dsl/exceptions.py +32 -0
  112. elasticsearch/dsl/faceted_search.py +28 -0
  113. elasticsearch/dsl/faceted_search_base.py +489 -0
  114. elasticsearch/dsl/field.py +4392 -0
  115. elasticsearch/dsl/function.py +180 -0
  116. elasticsearch/dsl/index.py +23 -0
  117. elasticsearch/dsl/index_base.py +178 -0
  118. elasticsearch/dsl/mapping.py +19 -0
  119. elasticsearch/dsl/mapping_base.py +219 -0
  120. elasticsearch/dsl/query.py +2822 -0
  121. elasticsearch/dsl/response/__init__.py +388 -0
  122. elasticsearch/dsl/response/aggs.py +100 -0
  123. elasticsearch/dsl/response/hit.py +53 -0
  124. elasticsearch/dsl/search.py +20 -0
  125. elasticsearch/dsl/search_base.py +1053 -0
  126. elasticsearch/dsl/serializer.py +34 -0
  127. elasticsearch/dsl/types.py +6453 -0
  128. elasticsearch/dsl/update_by_query.py +19 -0
  129. elasticsearch/dsl/update_by_query_base.py +149 -0
  130. elasticsearch/dsl/utils.py +687 -0
  131. elasticsearch/dsl/wrappers.py +144 -0
  132. elasticsearch/helpers/actions.py +1 -1
  133. elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
  134. elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
  135. elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
  136. {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
  137. elasticsearch-9.0.0.dist-info/RECORD +160 -0
  138. elasticsearch/transport.py +0 -57
  139. elasticsearch-8.17.1.dist-info/RECORD +0 -119
  140. {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
  141. {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
  142. {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
@@ -37,16 +37,18 @@ class WatcherClient(NamespacedClient):
37
37
  pretty: t.Optional[bool] = None,
38
38
  ) -> ObjectApiResponse[t.Any]:
39
39
  """
40
- Acknowledge a watch. Acknowledging a watch enables you to manually throttle the
41
- execution of the watch's actions. The acknowledgement state of an action is stored
42
- in the `status.actions.<id>.ack.state` structure. IMPORTANT: If the specified
43
- watch is currently being executed, this API will return an error The reason for
44
- this behavior is to prevent overwriting the watch status from a watch execution.
45
- Acknowledging an action throttles further executions of that action until its
46
- `ack.state` is reset to `awaits_successful_execution`. This happens when the
47
- condition of the watch is not met (the condition evaluates to false).
40
+ .. raw:: html
48
41
 
49
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-ack-watch.html>`_
42
+ <p>Acknowledge a watch.
43
+ Acknowledging a watch enables you to manually throttle the execution of the watch's actions.</p>
44
+ <p>The acknowledgement state of an action is stored in the <code>status.actions.&lt;id&gt;.ack.state</code> structure.</p>
45
+ <p>IMPORTANT: If the specified watch is currently being executed, this API will return an error
46
+ The reason for this behavior is to prevent overwriting the watch status from a watch execution.</p>
47
+ <p>Acknowledging an action throttles further executions of that action until its <code>ack.state</code> is reset to <code>awaits_successful_execution</code>.
48
+ This happens when the condition of the watch is not met (the condition evaluates to false).</p>
49
+
50
+
51
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-ack-watch>`_
50
52
 
51
53
  :param watch_id: The watch identifier.
52
54
  :param action_id: A comma-separated list of the action identifiers to acknowledge.
@@ -96,9 +98,13 @@ class WatcherClient(NamespacedClient):
96
98
  pretty: t.Optional[bool] = None,
97
99
  ) -> ObjectApiResponse[t.Any]:
98
100
  """
99
- Activate a watch. A watch can be either active or inactive.
101
+ .. raw:: html
102
+
103
+ <p>Activate a watch.
104
+ A watch can be either active or inactive.</p>
105
+
100
106
 
101
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-activate-watch.html>`_
107
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-activate-watch>`_
102
108
 
103
109
  :param watch_id: The watch identifier.
104
110
  """
@@ -136,9 +142,13 @@ class WatcherClient(NamespacedClient):
136
142
  pretty: t.Optional[bool] = None,
137
143
  ) -> ObjectApiResponse[t.Any]:
138
144
  """
139
- Deactivate a watch. A watch can be either active or inactive.
145
+ .. raw:: html
140
146
 
141
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-deactivate-watch.html>`_
147
+ <p>Deactivate a watch.
148
+ A watch can be either active or inactive.</p>
149
+
150
+
151
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-deactivate-watch>`_
142
152
 
143
153
  :param watch_id: The watch identifier.
144
154
  """
@@ -176,15 +186,17 @@ class WatcherClient(NamespacedClient):
176
186
  pretty: t.Optional[bool] = None,
177
187
  ) -> ObjectApiResponse[t.Any]:
178
188
  """
179
- Delete a watch. When the watch is removed, the document representing the watch
180
- in the `.watches` index is gone and it will never be run again. Deleting a watch
181
- does not delete any watch execution records related to this watch from the watch
182
- history. IMPORTANT: Deleting a watch must be done by using only this API. Do
183
- not delete the watch directly from the `.watches` index using the Elasticsearch
184
- delete document API When Elasticsearch security features are enabled, make sure
185
- no write privileges are granted to anyone for the `.watches` index.
189
+ .. raw:: html
190
+
191
+ <p>Delete a watch.
192
+ When the watch is removed, the document representing the watch in the <code>.watches</code> index is gone and it will never be run again.</p>
193
+ <p>Deleting a watch does not delete any watch execution records related to this watch from the watch history.</p>
194
+ <p>IMPORTANT: Deleting a watch must be done by using only this API.
195
+ Do not delete the watch directly from the <code>.watches</code> index using the Elasticsearch delete document API
196
+ When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the <code>.watches</code> index.</p>
197
+
186
198
 
187
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-delete-watch.html>`_
199
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-delete-watch>`_
188
200
 
189
201
  :param id: The watch identifier.
190
202
  """
@@ -251,23 +263,21 @@ class WatcherClient(NamespacedClient):
251
263
  body: t.Optional[t.Dict[str, t.Any]] = None,
252
264
  ) -> ObjectApiResponse[t.Any]:
253
265
  """
254
- Run a watch. This API can be used to force execution of the watch outside of
255
- its triggering logic or to simulate the watch execution for debugging purposes.
256
- For testing and debugging purposes, you also have fine-grained control on how
257
- the watch runs. You can run the watch without running all of its actions or alternatively
258
- by simulating them. You can also force execution by ignoring the watch condition
259
- and control whether a watch record would be written to the watch history after
260
- it runs. You can use the run watch API to run watches that are not yet registered
261
- by specifying the watch definition inline. This serves as great tool for testing
262
- and debugging your watches prior to adding them to Watcher. When Elasticsearch
263
- security features are enabled on your cluster, watches are run with the privileges
264
- of the user that stored the watches. If your user is allowed to read index `a`,
265
- but not index `b`, then the exact same set of rules will apply during execution
266
- of a watch. When using the run watch API, the authorization data of the user
267
- that called the API will be used as a base, instead of the information who stored
268
- the watch.
269
-
270
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-execute-watch.html>`_
266
+ .. raw:: html
267
+
268
+ <p>Run a watch.
269
+ This API can be used to force execution of the watch outside of its triggering logic or to simulate the watch execution for debugging purposes.</p>
270
+ <p>For testing and debugging purposes, you also have fine-grained control on how the watch runs.
271
+ You can run the watch without running all of its actions or alternatively by simulating them.
272
+ You can also force execution by ignoring the watch condition and control whether a watch record would be written to the watch history after it runs.</p>
273
+ <p>You can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.
274
+ This serves as great tool for testing and debugging your watches prior to adding them to Watcher.</p>
275
+ <p>When Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.
276
+ If your user is allowed to read index <code>a</code>, but not index <code>b</code>, then the exact same set of rules will apply during execution of a watch.</p>
277
+ <p>When using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.</p>
278
+
279
+
280
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-execute-watch>`_
271
281
 
272
282
  :param id: The watch identifier.
273
283
  :param action_modes: Determines how to handle the watch actions as part of the
@@ -348,11 +358,14 @@ class WatcherClient(NamespacedClient):
348
358
  pretty: t.Optional[bool] = None,
349
359
  ) -> ObjectApiResponse[t.Any]:
350
360
  """
351
- Get Watcher index settings. Get settings for the Watcher internal index (`.watches`).
352
- Only a subset of settings are shown, for example `index.auto_expand_replicas`
353
- and `index.number_of_replicas`.
361
+ .. raw:: html
362
+
363
+ <p>Get Watcher index settings.
364
+ Get settings for the Watcher internal index (<code>.watches</code>).
365
+ Only a subset of settings are shown, for example <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
354
366
 
355
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-get-settings.html>`_
367
+
368
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-get-settings>`_
356
369
 
357
370
  :param master_timeout: The period to wait for a connection to the master node.
358
371
  If no response is received before the timeout expires, the request fails
@@ -392,9 +405,12 @@ class WatcherClient(NamespacedClient):
392
405
  pretty: t.Optional[bool] = None,
393
406
  ) -> ObjectApiResponse[t.Any]:
394
407
  """
395
- Get a watch.
408
+ .. raw:: html
409
+
410
+ <p>Get a watch.</p>
396
411
 
397
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-get-watch.html>`_
412
+
413
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-get-watch>`_
398
414
 
399
415
  :param id: The watch identifier.
400
416
  """
@@ -456,19 +472,20 @@ class WatcherClient(NamespacedClient):
456
472
  body: t.Optional[t.Dict[str, t.Any]] = None,
457
473
  ) -> ObjectApiResponse[t.Any]:
458
474
  """
459
- Create or update a watch. When a watch is registered, a new document that represents
460
- the watch is added to the `.watches` index and its trigger is immediately registered
461
- with the relevant trigger engine. Typically for the `schedule` trigger, the scheduler
462
- is the trigger engine. IMPORTANT: You must use Kibana or this API to create a
463
- watch. Do not add a watch directly to the `.watches` index by using the Elasticsearch
464
- index API. If Elasticsearch security features are enabled, do not give users
465
- write privileges on the `.watches` index. When you add a watch you can also define
466
- its initial active state by setting the *active* parameter. When Elasticsearch
467
- security features are enabled, your watch can index or search only on indices
468
- for which the user that stored the watch has privileges. If the user is able
469
- to read index `a`, but not index `b`, the same will apply when the watch runs.
470
-
471
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-put-watch.html>`_
475
+ .. raw:: html
476
+
477
+ <p>Create or update a watch.
478
+ When a watch is registered, a new document that represents the watch is added to the <code>.watches</code> index and its trigger is immediately registered with the relevant trigger engine.
479
+ Typically for the <code>schedule</code> trigger, the scheduler is the trigger engine.</p>
480
+ <p>IMPORTANT: You must use Kibana or this API to create a watch.
481
+ Do not add a watch directly to the <code>.watches</code> index by using the Elasticsearch index API.
482
+ If Elasticsearch security features are enabled, do not give users write privileges on the <code>.watches</code> index.</p>
483
+ <p>When you add a watch you can also define its initial active state by setting the <em>active</em> parameter.</p>
484
+ <p>When Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.
485
+ If the user is able to read index <code>a</code>, but not index <code>b</code>, the same will apply when the watch runs.</p>
486
+
487
+
488
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-put-watch>`_
472
489
 
473
490
  :param id: The identifier for the watch.
474
491
  :param actions: The list of actions that will be run if the condition matches.
@@ -562,7 +579,7 @@ class WatcherClient(NamespacedClient):
562
579
  pretty: t.Optional[bool] = None,
563
580
  query: t.Optional[t.Mapping[str, t.Any]] = None,
564
581
  search_after: t.Optional[
565
- t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
582
+ t.Sequence[t.Union[None, bool, float, int, str]]
566
583
  ] = None,
567
584
  size: t.Optional[int] = None,
568
585
  sort: t.Optional[
@@ -574,11 +591,14 @@ class WatcherClient(NamespacedClient):
574
591
  body: t.Optional[t.Dict[str, t.Any]] = None,
575
592
  ) -> ObjectApiResponse[t.Any]:
576
593
  """
577
- Query watches. Get all registered watches in a paginated manner and optionally
578
- filter watches by a query. Note that only the `_id` and `metadata.*` fields are
579
- queryable or sortable.
594
+ .. raw:: html
595
+
596
+ <p>Query watches.
597
+ Get all registered watches in a paginated manner and optionally filter watches by a query.</p>
598
+ <p>Note that only the <code>_id</code> and <code>metadata.*</code> fields are queryable or sortable.</p>
599
+
580
600
 
581
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-query-watches.html>`_
601
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-query-watches>`_
582
602
 
583
603
  :param from_: The offset from the first result to fetch. It must be non-negative.
584
604
  :param query: A query that filters the watches to be returned.
@@ -643,12 +663,19 @@ class WatcherClient(NamespacedClient):
643
663
  error_trace: t.Optional[bool] = None,
644
664
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
645
665
  human: t.Optional[bool] = None,
666
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
646
667
  pretty: t.Optional[bool] = None,
647
668
  ) -> ObjectApiResponse[t.Any]:
648
669
  """
649
- Start the watch service. Start the Watcher service if it is not already running.
670
+ .. raw:: html
671
+
672
+ <p>Start the watch service.
673
+ Start the Watcher service if it is not already running.</p>
674
+
675
+
676
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-start>`_
650
677
 
651
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-start.html>`_
678
+ :param master_timeout: Period to wait for a connection to the master node.
652
679
  """
653
680
  __path_parts: t.Dict[str, str] = {}
654
681
  __path = "/_watcher/_start"
@@ -659,6 +686,8 @@ class WatcherClient(NamespacedClient):
659
686
  __query["filter_path"] = filter_path
660
687
  if human is not None:
661
688
  __query["human"] = human
689
+ if master_timeout is not None:
690
+ __query["master_timeout"] = master_timeout
662
691
  if pretty is not None:
663
692
  __query["pretty"] = pretty
664
693
  __headers = {"accept": "application/json"}
@@ -703,10 +732,14 @@ class WatcherClient(NamespacedClient):
703
732
  pretty: t.Optional[bool] = None,
704
733
  ) -> ObjectApiResponse[t.Any]:
705
734
  """
706
- Get Watcher statistics. This API always returns basic metrics. You retrieve more
707
- metrics by using the metric parameter.
735
+ .. raw:: html
736
+
737
+ <p>Get Watcher statistics.
738
+ This API always returns basic metrics.
739
+ You retrieve more metrics by using the metric parameter.</p>
740
+
708
741
 
709
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-stats.html>`_
742
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-stats>`_
710
743
 
711
744
  :param metric: Defines which additional metrics are included in the response.
712
745
  :param emit_stacktraces: Defines whether stack traces are generated for each
@@ -751,9 +784,13 @@ class WatcherClient(NamespacedClient):
751
784
  pretty: t.Optional[bool] = None,
752
785
  ) -> ObjectApiResponse[t.Any]:
753
786
  """
754
- Stop the watch service. Stop the Watcher service if it is running.
787
+ .. raw:: html
755
788
 
756
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-stop.html>`_
789
+ <p>Stop the watch service.
790
+ Stop the Watcher service if it is running.</p>
791
+
792
+
793
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-stop>`_
757
794
 
758
795
  :param master_timeout: The period to wait for the master node. If the master
759
796
  node is not available before the timeout expires, the request fails and returns
@@ -803,11 +840,18 @@ class WatcherClient(NamespacedClient):
803
840
  body: t.Optional[t.Dict[str, t.Any]] = None,
804
841
  ) -> ObjectApiResponse[t.Any]:
805
842
  """
806
- Update Watcher index settings. Update settings for the Watcher internal index
807
- (`.watches`). Only a subset of settings can be modified. This includes `index.auto_expand_replicas`
808
- and `index.number_of_replicas`.
843
+ .. raw:: html
844
+
845
+ <p>Update Watcher index settings.
846
+ Update settings for the Watcher internal index (<code>.watches</code>).
847
+ Only a subset of settings can be modified.
848
+ This includes <code>index.auto_expand_replicas</code>, <code>index.number_of_replicas</code>, <code>index.routing.allocation.exclude.*</code>,
849
+ <code>index.routing.allocation.include.*</code> and <code>index.routing.allocation.require.*</code>.
850
+ Modification of <code>index.routing.allocation.include._tier_preference</code> is an exception and is not allowed as the
851
+ Watcher shards must always be in the <code>data_content</code> tier.</p>
852
+
809
853
 
810
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-update-settings.html>`_
854
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-update-settings>`_
811
855
 
812
856
  :param index_auto_expand_replicas:
813
857
  :param index_number_of_replicas:
@@ -43,12 +43,18 @@ class XPackClient(NamespacedClient):
43
43
  pretty: t.Optional[bool] = None,
44
44
  ) -> ObjectApiResponse[t.Any]:
45
45
  """
46
- Get information. The information provided by the API includes: * Build information
47
- including the build number and timestamp. * License information about the currently
48
- installed license. * Feature information for the features that are currently
49
- enabled and available under the current license.
46
+ .. raw:: html
50
47
 
51
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/info-api.html>`_
48
+ <p>Get information.
49
+ The information provided by the API includes:</p>
50
+ <ul>
51
+ <li>Build information including the build number and timestamp.</li>
52
+ <li>License information about the currently installed license.</li>
53
+ <li>Feature information for the features that are currently enabled and available under the current license.</li>
54
+ </ul>
55
+
56
+
57
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-info>`_
52
58
 
53
59
  :param accept_enterprise: If this param is used it must be set to true
54
60
  :param categories: A comma-separated list of the information categories to include
@@ -90,11 +96,14 @@ class XPackClient(NamespacedClient):
90
96
  pretty: t.Optional[bool] = None,
91
97
  ) -> ObjectApiResponse[t.Any]:
92
98
  """
93
- Get usage information. Get information about the features that are currently
94
- enabled and available under the current license. The API also provides some usage
95
- statistics.
99
+ .. raw:: html
100
+
101
+ <p>Get usage information.
102
+ Get information about the features that are currently enabled and available under the current license.
103
+ The API also provides some usage statistics.</p>
104
+
96
105
 
97
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/usage-api.html>`_
106
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-xpack>`_
98
107
 
99
108
  :param master_timeout: The period to wait for a connection to the master node.
100
109
  If no response is received before the timeout expires, the request fails
elasticsearch/_version.py CHANGED
@@ -15,4 +15,4 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- __versionstr__ = "8.17.1"
18
+ __versionstr__ = "9.0.0"
elasticsearch/client.py CHANGED
@@ -73,6 +73,8 @@ from ._sync.client.xpack import XPackClient as XPackClient # noqa: F401
73
73
  from ._utils import fixup_module_metadata
74
74
 
75
75
  # This file exists for backwards compatibility.
76
+ # We can't remove it as we use it for the Sphinx docs which show the full page, and we'd
77
+ # rather show `elasticsearch.client.FooClient` than `elasticsearch._sync.client.FooClient`.
76
78
  warnings.warn(
77
79
  "Importing from the 'elasticsearch.client' module is deprecated. "
78
80
  "Instead use 'elasticsearch' module for importing the client.",
@@ -0,0 +1,203 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ from . import async_connections, connections
19
+ from .aggs import A, Agg
20
+ from .analysis import analyzer, char_filter, normalizer, token_filter, tokenizer
21
+ from .document import AsyncDocument, Document
22
+ from .document_base import InnerDoc, M, MetaField, mapped_field
23
+ from .exceptions import (
24
+ ElasticsearchDslException,
25
+ IllegalOperation,
26
+ UnknownDslObject,
27
+ ValidationException,
28
+ )
29
+ from .faceted_search import (
30
+ AsyncFacetedSearch,
31
+ DateHistogramFacet,
32
+ Facet,
33
+ FacetedResponse,
34
+ FacetedSearch,
35
+ HistogramFacet,
36
+ NestedFacet,
37
+ RangeFacet,
38
+ TermsFacet,
39
+ )
40
+ from .field import (
41
+ Binary,
42
+ Boolean,
43
+ Byte,
44
+ Completion,
45
+ ConstantKeyword,
46
+ CustomField,
47
+ Date,
48
+ DateRange,
49
+ DenseVector,
50
+ Double,
51
+ DoubleRange,
52
+ Field,
53
+ Float,
54
+ FloatRange,
55
+ GeoPoint,
56
+ GeoShape,
57
+ HalfFloat,
58
+ Integer,
59
+ IntegerRange,
60
+ Ip,
61
+ IpRange,
62
+ Join,
63
+ Keyword,
64
+ Long,
65
+ LongRange,
66
+ Murmur3,
67
+ Nested,
68
+ Object,
69
+ Percolator,
70
+ Point,
71
+ RangeField,
72
+ RankFeature,
73
+ RankFeatures,
74
+ ScaledFloat,
75
+ SearchAsYouType,
76
+ Shape,
77
+ Short,
78
+ SparseVector,
79
+ Text,
80
+ TokenCount,
81
+ construct_field,
82
+ )
83
+ from .function import SF
84
+ from .index import (
85
+ AsyncComposableIndexTemplate,
86
+ AsyncIndex,
87
+ AsyncIndexTemplate,
88
+ ComposableIndexTemplate,
89
+ Index,
90
+ IndexTemplate,
91
+ )
92
+ from .mapping import AsyncMapping, Mapping
93
+ from .query import Q, Query
94
+ from .response import AggResponse, Response, UpdateByQueryResponse
95
+ from .search import (
96
+ AsyncEmptySearch,
97
+ AsyncMultiSearch,
98
+ AsyncSearch,
99
+ EmptySearch,
100
+ MultiSearch,
101
+ Search,
102
+ )
103
+ from .update_by_query import AsyncUpdateByQuery, UpdateByQuery
104
+ from .utils import AttrDict, AttrList, DslBase
105
+ from .wrappers import Range
106
+
107
+ __all__ = [
108
+ "A",
109
+ "Agg",
110
+ "AggResponse",
111
+ "AsyncComposableIndexTemplate",
112
+ "AsyncDocument",
113
+ "AsyncEmptySearch",
114
+ "AsyncFacetedSearch",
115
+ "AsyncIndex",
116
+ "AsyncIndexTemplate",
117
+ "AsyncMapping",
118
+ "AsyncMultiSearch",
119
+ "AsyncSearch",
120
+ "AsyncUpdateByQuery",
121
+ "AttrDict",
122
+ "AttrList",
123
+ "Binary",
124
+ "Boolean",
125
+ "Byte",
126
+ "Completion",
127
+ "ComposableIndexTemplate",
128
+ "ConstantKeyword",
129
+ "CustomField",
130
+ "Date",
131
+ "DateHistogramFacet",
132
+ "DateRange",
133
+ "DenseVector",
134
+ "Document",
135
+ "Double",
136
+ "DoubleRange",
137
+ "DslBase",
138
+ "ElasticsearchDslException",
139
+ "EmptySearch",
140
+ "Facet",
141
+ "FacetedResponse",
142
+ "FacetedSearch",
143
+ "Field",
144
+ "Float",
145
+ "FloatRange",
146
+ "GeoPoint",
147
+ "GeoShape",
148
+ "HalfFloat",
149
+ "HistogramFacet",
150
+ "IllegalOperation",
151
+ "Index",
152
+ "IndexTemplate",
153
+ "InnerDoc",
154
+ "Integer",
155
+ "IntegerRange",
156
+ "Ip",
157
+ "IpRange",
158
+ "Join",
159
+ "Keyword",
160
+ "Long",
161
+ "LongRange",
162
+ "M",
163
+ "Mapping",
164
+ "MetaField",
165
+ "MultiSearch",
166
+ "Murmur3",
167
+ "Nested",
168
+ "NestedFacet",
169
+ "Object",
170
+ "Percolator",
171
+ "Point",
172
+ "Q",
173
+ "Query",
174
+ "Range",
175
+ "RangeFacet",
176
+ "RangeField",
177
+ "RankFeature",
178
+ "RankFeatures",
179
+ "Response",
180
+ "SF",
181
+ "ScaledFloat",
182
+ "Search",
183
+ "SearchAsYouType",
184
+ "Shape",
185
+ "Short",
186
+ "SparseVector",
187
+ "TermsFacet",
188
+ "Text",
189
+ "TokenCount",
190
+ "UnknownDslObject",
191
+ "UpdateByQuery",
192
+ "UpdateByQueryResponse",
193
+ "ValidationException",
194
+ "analyzer",
195
+ "async_connections",
196
+ "char_filter",
197
+ "connections",
198
+ "construct_field",
199
+ "mapped_field",
200
+ "normalizer",
201
+ "token_filter",
202
+ "tokenizer",
203
+ ]
@@ -0,0 +1,16 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.