elasticsearch 8.17.2__py3-none-any.whl → 8.18.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 (135) hide show
  1. elasticsearch/_async/client/__init__.py +174 -79
  2. elasticsearch/_async/client/_base.py +0 -1
  3. elasticsearch/_async/client/async_search.py +12 -8
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -26
  6. elasticsearch/_async/client/ccr.py +186 -72
  7. elasticsearch/_async/client/cluster.py +38 -19
  8. elasticsearch/_async/client/connector.py +30 -30
  9. elasticsearch/_async/client/dangling_indices.py +3 -3
  10. elasticsearch/_async/client/enrich.py +26 -5
  11. elasticsearch/_async/client/eql.py +32 -4
  12. elasticsearch/_async/client/esql.py +62 -6
  13. elasticsearch/_async/client/features.py +12 -2
  14. elasticsearch/_async/client/fleet.py +8 -2
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +23 -22
  17. elasticsearch/_async/client/indices.py +424 -132
  18. elasticsearch/_async/client/inference.py +1853 -115
  19. elasticsearch/_async/client/ingest.py +32 -38
  20. elasticsearch/_async/client/license.py +51 -16
  21. elasticsearch/_async/client/logstash.py +3 -3
  22. elasticsearch/_async/client/migration.py +3 -3
  23. elasticsearch/_async/client/ml.py +141 -112
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +9 -27
  26. elasticsearch/_async/client/query_rules.py +8 -8
  27. elasticsearch/_async/client/rollup.py +8 -8
  28. elasticsearch/_async/client/search_application.py +13 -13
  29. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  30. elasticsearch/_async/client/security.py +71 -71
  31. elasticsearch/_async/client/shutdown.py +3 -10
  32. elasticsearch/_async/client/simulate.py +6 -6
  33. elasticsearch/_async/client/slm.py +9 -9
  34. elasticsearch/_async/client/snapshot.py +13 -17
  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 -9
  39. elasticsearch/_async/client/text_structure.py +4 -4
  40. elasticsearch/_async/client/transform.py +30 -28
  41. elasticsearch/_async/client/watcher.py +22 -14
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_async/helpers.py +0 -1
  44. elasticsearch/_sync/client/__init__.py +174 -79
  45. elasticsearch/_sync/client/_base.py +0 -1
  46. elasticsearch/_sync/client/async_search.py +12 -8
  47. elasticsearch/_sync/client/autoscaling.py +4 -4
  48. elasticsearch/_sync/client/cat.py +26 -26
  49. elasticsearch/_sync/client/ccr.py +186 -72
  50. elasticsearch/_sync/client/cluster.py +38 -19
  51. elasticsearch/_sync/client/connector.py +30 -30
  52. elasticsearch/_sync/client/dangling_indices.py +3 -3
  53. elasticsearch/_sync/client/enrich.py +26 -5
  54. elasticsearch/_sync/client/eql.py +32 -4
  55. elasticsearch/_sync/client/esql.py +62 -6
  56. elasticsearch/_sync/client/features.py +12 -2
  57. elasticsearch/_sync/client/fleet.py +8 -2
  58. elasticsearch/_sync/client/graph.py +1 -1
  59. elasticsearch/_sync/client/ilm.py +23 -22
  60. elasticsearch/_sync/client/indices.py +424 -132
  61. elasticsearch/_sync/client/inference.py +1853 -115
  62. elasticsearch/_sync/client/ingest.py +32 -38
  63. elasticsearch/_sync/client/license.py +51 -16
  64. elasticsearch/_sync/client/logstash.py +3 -3
  65. elasticsearch/_sync/client/migration.py +3 -3
  66. elasticsearch/_sync/client/ml.py +141 -112
  67. elasticsearch/_sync/client/monitoring.py +1 -1
  68. elasticsearch/_sync/client/nodes.py +9 -27
  69. elasticsearch/_sync/client/query_rules.py +8 -8
  70. elasticsearch/_sync/client/rollup.py +8 -8
  71. elasticsearch/_sync/client/search_application.py +13 -13
  72. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  73. elasticsearch/_sync/client/security.py +71 -71
  74. elasticsearch/_sync/client/shutdown.py +3 -10
  75. elasticsearch/_sync/client/simulate.py +6 -6
  76. elasticsearch/_sync/client/slm.py +9 -9
  77. elasticsearch/_sync/client/snapshot.py +13 -17
  78. elasticsearch/_sync/client/sql.py +6 -6
  79. elasticsearch/_sync/client/ssl.py +1 -1
  80. elasticsearch/_sync/client/synonyms.py +7 -7
  81. elasticsearch/_sync/client/tasks.py +3 -9
  82. elasticsearch/_sync/client/text_structure.py +4 -4
  83. elasticsearch/_sync/client/transform.py +30 -28
  84. elasticsearch/_sync/client/utils.py +0 -3
  85. elasticsearch/_sync/client/watcher.py +22 -14
  86. elasticsearch/_sync/client/xpack.py +2 -2
  87. elasticsearch/_version.py +1 -1
  88. elasticsearch/dsl/__init__.py +203 -0
  89. elasticsearch/dsl/_async/__init__.py +16 -0
  90. elasticsearch/dsl/_async/document.py +522 -0
  91. elasticsearch/dsl/_async/faceted_search.py +50 -0
  92. elasticsearch/dsl/_async/index.py +639 -0
  93. elasticsearch/dsl/_async/mapping.py +49 -0
  94. elasticsearch/dsl/_async/search.py +233 -0
  95. elasticsearch/dsl/_async/update_by_query.py +47 -0
  96. elasticsearch/dsl/_sync/__init__.py +16 -0
  97. elasticsearch/dsl/_sync/document.py +514 -0
  98. elasticsearch/dsl/_sync/faceted_search.py +50 -0
  99. elasticsearch/dsl/_sync/index.py +597 -0
  100. elasticsearch/dsl/_sync/mapping.py +49 -0
  101. elasticsearch/dsl/_sync/search.py +226 -0
  102. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  103. elasticsearch/dsl/aggs.py +3730 -0
  104. elasticsearch/dsl/analysis.py +341 -0
  105. elasticsearch/dsl/async_connections.py +37 -0
  106. elasticsearch/dsl/connections.py +142 -0
  107. elasticsearch/dsl/document.py +20 -0
  108. elasticsearch/dsl/document_base.py +444 -0
  109. elasticsearch/dsl/exceptions.py +32 -0
  110. elasticsearch/dsl/faceted_search.py +28 -0
  111. elasticsearch/dsl/faceted_search_base.py +489 -0
  112. elasticsearch/dsl/field.py +4254 -0
  113. elasticsearch/dsl/function.py +180 -0
  114. elasticsearch/dsl/index.py +23 -0
  115. elasticsearch/dsl/index_base.py +178 -0
  116. elasticsearch/dsl/mapping.py +19 -0
  117. elasticsearch/dsl/mapping_base.py +219 -0
  118. elasticsearch/dsl/query.py +2816 -0
  119. elasticsearch/dsl/response/__init__.py +388 -0
  120. elasticsearch/dsl/response/aggs.py +100 -0
  121. elasticsearch/dsl/response/hit.py +53 -0
  122. elasticsearch/dsl/search.py +20 -0
  123. elasticsearch/dsl/search_base.py +1040 -0
  124. elasticsearch/dsl/serializer.py +34 -0
  125. elasticsearch/dsl/types.py +6471 -0
  126. elasticsearch/dsl/update_by_query.py +19 -0
  127. elasticsearch/dsl/update_by_query_base.py +149 -0
  128. elasticsearch/dsl/utils.py +687 -0
  129. elasticsearch/dsl/wrappers.py +119 -0
  130. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.0.dist-info}/METADATA +12 -2
  131. elasticsearch-8.18.0.dist-info/RECORD +161 -0
  132. elasticsearch-8.17.2.dist-info/RECORD +0 -119
  133. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.0.dist-info}/WHEEL +0 -0
  134. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.0.dist-info}/licenses/LICENSE +0 -0
  135. {elasticsearch-8.17.2.dist-info → elasticsearch-8.18.0.dist-info}/licenses/NOTICE +0 -0
@@ -41,11 +41,10 @@ class TransformClient(NamespacedClient):
41
41
  """
42
42
  .. raw:: html
43
43
 
44
- <p>Delete a transform.
45
- Deletes a transform.</p>
44
+ <p>Delete a transform.</p>
46
45
 
47
46
 
48
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-transform.html>`_
47
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-transform.html>`_
49
48
 
50
49
  :param transform_id: Identifier for the transform.
51
50
  :param delete_dest_index: If this value is true, the destination index is deleted
@@ -106,10 +105,10 @@ class TransformClient(NamespacedClient):
106
105
  .. raw:: html
107
106
 
108
107
  <p>Get transforms.
109
- Retrieves configuration information for transforms.</p>
108
+ Get configuration information for transforms.</p>
110
109
 
111
110
 
112
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-transform.html>`_
111
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform.html>`_
113
112
 
114
113
  :param transform_id: Identifier for the transform. It can be a transform identifier
115
114
  or a wildcard expression. You can get information for all transforms by using
@@ -178,11 +177,11 @@ class TransformClient(NamespacedClient):
178
177
  """
179
178
  .. raw:: html
180
179
 
181
- <p>Get transform stats.
182
- Retrieves usage information for transforms.</p>
180
+ <p>Get transform stats.</p>
181
+ <p>Get usage information for transforms.</p>
183
182
 
184
183
 
185
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-transform-stats.html>`_
184
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform-stats.html>`_
186
185
 
187
186
  :param transform_id: Identifier for the transform. It can be a transform identifier
188
187
  or a wildcard expression. You can get information for all transforms by using
@@ -270,7 +269,7 @@ class TransformClient(NamespacedClient):
270
269
  types of the source index and the transform aggregations.</p>
271
270
 
272
271
 
273
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/preview-transform.html>`_
272
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-transform.html>`_
274
273
 
275
274
  :param transform_id: Identifier for the transform to preview. If you specify
276
275
  this path parameter, you cannot provide transform configuration details in
@@ -407,7 +406,7 @@ class TransformClient(NamespacedClient):
407
406
  give users any privileges on <code>.data-frame-internal*</code> indices.</p>
408
407
 
409
408
 
410
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-transform.html>`_
409
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-transform.html>`_
411
410
 
412
411
  :param transform_id: Identifier for the transform. This identifier can contain
413
412
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -503,17 +502,17 @@ class TransformClient(NamespacedClient):
503
502
  force: t.Optional[bool] = None,
504
503
  human: t.Optional[bool] = None,
505
504
  pretty: t.Optional[bool] = None,
505
+ timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
506
506
  ) -> ObjectApiResponse[t.Any]:
507
507
  """
508
508
  .. raw:: html
509
509
 
510
- <p>Reset a transform.
511
- Resets a transform.
512
- Before you can reset it, you must stop it; alternatively, use the <code>force</code> query parameter.
510
+ <p>Reset a transform.</p>
511
+ <p>Before you can reset it, you must stop it; alternatively, use the <code>force</code> query parameter.
513
512
  If the destination index was created by the transform, it is deleted.</p>
514
513
 
515
514
 
516
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/reset-transform.html>`_
515
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-transform.html>`_
517
516
 
518
517
  :param transform_id: Identifier for the transform. This identifier can contain
519
518
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -521,6 +520,8 @@ class TransformClient(NamespacedClient):
521
520
  :param force: If this value is `true`, the transform is reset regardless of its
522
521
  current state. If it's `false`, the transform must be stopped before it can
523
522
  be reset.
523
+ :param timeout: Period to wait for a response. If no response is received before
524
+ the timeout expires, the request fails and returns an error.
524
525
  """
525
526
  if transform_id in SKIP_IN_PATH:
526
527
  raise ValueError("Empty value passed for parameter 'transform_id'")
@@ -537,6 +538,8 @@ class TransformClient(NamespacedClient):
537
538
  __query["human"] = human
538
539
  if pretty is not None:
539
540
  __query["pretty"] = pretty
541
+ if timeout is not None:
542
+ __query["timeout"] = timeout
540
543
  __headers = {"accept": "application/json"}
541
544
  return self.perform_request( # type: ignore[return-value]
542
545
  "POST",
@@ -561,15 +564,15 @@ class TransformClient(NamespacedClient):
561
564
  """
562
565
  .. raw:: html
563
566
 
564
- <p>Schedule a transform to start now.
565
- Instantly runs a transform to process data.</p>
566
- <p>If you _schedule_now a transform, it will process the new data instantly,
567
- without waiting for the configured frequency interval. After _schedule_now API is called,
568
- the transform will be processed again at now + frequency unless _schedule_now API
567
+ <p>Schedule a transform to start now.</p>
568
+ <p>Instantly run a transform to process data.
569
+ If you run this API, the transform will process the new data instantly,
570
+ without waiting for the configured frequency interval. After the API is called,
571
+ the transform will be processed again at <code>now + frequency</code> unless the API
569
572
  is called again in the meantime.</p>
570
573
 
571
574
 
572
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/schedule-now-transform.html>`_
575
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/schedule-now-transform.html>`_
573
576
 
574
577
  :param transform_id: Identifier for the transform.
575
578
  :param timeout: Controls the time to wait for the scheduling to take place
@@ -616,8 +619,7 @@ class TransformClient(NamespacedClient):
616
619
  """
617
620
  .. raw:: html
618
621
 
619
- <p>Start a transform.
620
- Starts a transform.</p>
622
+ <p>Start a transform.</p>
621
623
  <p>When you start a transform, it creates the destination index if it does not already exist. The <code>number_of_shards</code> is
622
624
  set to <code>1</code> and the <code>auto_expand_replicas</code> is set to <code>0-1</code>. If it is a pivot transform, it deduces the mapping
623
625
  definitions for the destination index from the source indices and the transform aggregations. If fields in the
@@ -633,7 +635,7 @@ class TransformClient(NamespacedClient):
633
635
  destination indices, the transform fails when it attempts unauthorized operations.</p>
634
636
 
635
637
 
636
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/start-transform.html>`_
638
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-transform.html>`_
637
639
 
638
640
  :param transform_id: Identifier for the transform.
639
641
  :param from_: Restricts the set of transformed entities to those changed after
@@ -691,7 +693,7 @@ class TransformClient(NamespacedClient):
691
693
  Stops one or more transforms.</p>
692
694
 
693
695
 
694
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stop-transform.html>`_
696
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-transform.html>`_
695
697
 
696
698
  :param transform_id: Identifier for the transform. To stop multiple transforms,
697
699
  use a comma-separated list or a wildcard expression. To stop all transforms,
@@ -793,7 +795,7 @@ class TransformClient(NamespacedClient):
793
795
  time of update and runs with those privileges.</p>
794
796
 
795
797
 
796
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-transform.html>`_
798
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-transform.html>`_
797
799
 
798
800
  :param transform_id: Identifier for the transform.
799
801
  :param defer_validation: When true, deferrable validations are not run. This
@@ -874,8 +876,8 @@ class TransformClient(NamespacedClient):
874
876
  """
875
877
  .. raw:: html
876
878
 
877
- <p>Upgrade all transforms.
878
- Transforms are compatible across minor versions and between supported major versions.
879
+ <p>Upgrade all transforms.</p>
880
+ <p>Transforms are compatible across minor versions and between supported major versions.
879
881
  However, over time, the format of transform configuration information may change.
880
882
  This API identifies transforms that have a legacy configuration format and upgrades them to the latest version.
881
883
  It also cleans up the internal data structures that store the transform state and checkpoints.
@@ -888,7 +890,7 @@ class TransformClient(NamespacedClient):
888
890
  You may want to perform a recent cluster backup prior to the upgrade.</p>
889
891
 
890
892
 
891
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/upgrade-transforms.html>`_
893
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/upgrade-transforms.html>`_
892
894
 
893
895
  :param dry_run: When true, the request checks for updates but does not run them.
894
896
  :param timeout: Period to wait for a response. If no response is received before
@@ -134,7 +134,6 @@ def client_node_configs(
134
134
 
135
135
  def apply_node_options(node_config: NodeConfig) -> NodeConfig:
136
136
  """Needs special handling of headers since .replace() wipes out existing headers"""
137
- nonlocal node_options
138
137
  headers = node_config.headers.copy() # type: ignore[attr-defined]
139
138
 
140
139
  headers_to_add = node_options.pop("headers", ())
@@ -343,8 +342,6 @@ def _rewrite_parameters(
343
342
  def wrapper(api: F) -> F:
344
343
  @wraps(api)
345
344
  def wrapped(*args: Any, **kwargs: Any) -> Any:
346
- nonlocal api, body_name, body_fields
347
-
348
345
  # Let's give a nicer error message when users pass positional arguments.
349
346
  if len(args) >= 2:
350
347
  raise TypeError(
@@ -48,7 +48,7 @@ class WatcherClient(NamespacedClient):
48
48
  This happens when the condition of the watch is not met (the condition evaluates to false).</p>
49
49
 
50
50
 
51
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-ack-watch.html>`_
51
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-ack-watch.html>`_
52
52
 
53
53
  :param watch_id: The watch identifier.
54
54
  :param action_id: A comma-separated list of the action identifiers to acknowledge.
@@ -104,7 +104,7 @@ class WatcherClient(NamespacedClient):
104
104
  A watch can be either active or inactive.</p>
105
105
 
106
106
 
107
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-activate-watch.html>`_
107
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-activate-watch.html>`_
108
108
 
109
109
  :param watch_id: The watch identifier.
110
110
  """
@@ -148,7 +148,7 @@ class WatcherClient(NamespacedClient):
148
148
  A watch can be either active or inactive.</p>
149
149
 
150
150
 
151
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-deactivate-watch.html>`_
151
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-deactivate-watch.html>`_
152
152
 
153
153
  :param watch_id: The watch identifier.
154
154
  """
@@ -196,7 +196,7 @@ class WatcherClient(NamespacedClient):
196
196
  When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the <code>.watches</code> index.</p>
197
197
 
198
198
 
199
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-delete-watch.html>`_
199
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-delete-watch.html>`_
200
200
 
201
201
  :param id: The watch identifier.
202
202
  """
@@ -277,7 +277,7 @@ class WatcherClient(NamespacedClient):
277
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
278
 
279
279
 
280
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-execute-watch.html>`_
280
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-execute-watch.html>`_
281
281
 
282
282
  :param id: The watch identifier.
283
283
  :param action_modes: Determines how to handle the watch actions as part of the
@@ -365,7 +365,7 @@ class WatcherClient(NamespacedClient):
365
365
  Only a subset of settings are shown, for example <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
366
366
 
367
367
 
368
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-get-settings.html>`_
368
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-get-settings.html>`_
369
369
 
370
370
  :param master_timeout: The period to wait for a connection to the master node.
371
371
  If no response is received before the timeout expires, the request fails
@@ -410,7 +410,7 @@ class WatcherClient(NamespacedClient):
410
410
  <p>Get a watch.</p>
411
411
 
412
412
 
413
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-get-watch.html>`_
413
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-get-watch.html>`_
414
414
 
415
415
  :param id: The watch identifier.
416
416
  """
@@ -485,7 +485,7 @@ class WatcherClient(NamespacedClient):
485
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
486
 
487
487
 
488
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-put-watch.html>`_
488
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-put-watch.html>`_
489
489
 
490
490
  :param id: The identifier for the watch.
491
491
  :param actions: The list of actions that will be run if the condition matches.
@@ -598,7 +598,7 @@ class WatcherClient(NamespacedClient):
598
598
  <p>Note that only the <code>_id</code> and <code>metadata.*</code> fields are queryable or sortable.</p>
599
599
 
600
600
 
601
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-query-watches.html>`_
601
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-query-watches.html>`_
602
602
 
603
603
  :param from_: The offset from the first result to fetch. It must be non-negative.
604
604
  :param query: A query that filters the watches to be returned.
@@ -663,6 +663,7 @@ class WatcherClient(NamespacedClient):
663
663
  error_trace: t.Optional[bool] = None,
664
664
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
665
665
  human: t.Optional[bool] = None,
666
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
666
667
  pretty: t.Optional[bool] = None,
667
668
  ) -> ObjectApiResponse[t.Any]:
668
669
  """
@@ -672,7 +673,9 @@ class WatcherClient(NamespacedClient):
672
673
  Start the Watcher service if it is not already running.</p>
673
674
 
674
675
 
675
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-start.html>`_
676
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-start.html>`_
677
+
678
+ :param master_timeout: Period to wait for a connection to the master node.
676
679
  """
677
680
  __path_parts: t.Dict[str, str] = {}
678
681
  __path = "/_watcher/_start"
@@ -683,6 +686,8 @@ class WatcherClient(NamespacedClient):
683
686
  __query["filter_path"] = filter_path
684
687
  if human is not None:
685
688
  __query["human"] = human
689
+ if master_timeout is not None:
690
+ __query["master_timeout"] = master_timeout
686
691
  if pretty is not None:
687
692
  __query["pretty"] = pretty
688
693
  __headers = {"accept": "application/json"}
@@ -734,7 +739,7 @@ class WatcherClient(NamespacedClient):
734
739
  You retrieve more metrics by using the metric parameter.</p>
735
740
 
736
741
 
737
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-stats.html>`_
742
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stats.html>`_
738
743
 
739
744
  :param metric: Defines which additional metrics are included in the response.
740
745
  :param emit_stacktraces: Defines whether stack traces are generated for each
@@ -785,7 +790,7 @@ class WatcherClient(NamespacedClient):
785
790
  Stop the Watcher service if it is running.</p>
786
791
 
787
792
 
788
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-stop.html>`_
793
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stop.html>`_
789
794
 
790
795
  :param master_timeout: The period to wait for the master node. If the master
791
796
  node is not available before the timeout expires, the request fails and returns
@@ -840,10 +845,13 @@ class WatcherClient(NamespacedClient):
840
845
  <p>Update Watcher index settings.
841
846
  Update settings for the Watcher internal index (<code>.watches</code>).
842
847
  Only a subset of settings can be modified.
843
- This includes <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
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>
844
852
 
845
853
 
846
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/watcher-api-update-settings.html>`_
854
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-update-settings.html>`_
847
855
 
848
856
  :param index_auto_expand_replicas:
849
857
  :param index_number_of_replicas:
@@ -54,7 +54,7 @@ class XPackClient(NamespacedClient):
54
54
  </ul>
55
55
 
56
56
 
57
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/info-api.html>`_
57
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/info-api.html>`_
58
58
 
59
59
  :param accept_enterprise: If this param is used it must be set to true
60
60
  :param categories: A comma-separated list of the information categories to include
@@ -103,7 +103,7 @@ class XPackClient(NamespacedClient):
103
103
  The API also provides some usage statistics.</p>
104
104
 
105
105
 
106
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/usage-api.html>`_
106
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/usage-api.html>`_
107
107
 
108
108
  :param master_timeout: The period to wait for a connection to the master node.
109
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.2"
18
+ __versionstr__ = "8.18.0"
@@ -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.