elasticsearch 8.17.2__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 (138) hide show
  1. elasticsearch/_async/client/__init__.py +192 -312
  2. elasticsearch/_async/client/_base.py +1 -2
  3. elasticsearch/_async/client/async_search.py +14 -14
  4. elasticsearch/_async/client/autoscaling.py +4 -4
  5. elasticsearch/_async/client/cat.py +26 -33
  6. elasticsearch/_async/client/ccr.py +186 -72
  7. elasticsearch/_async/client/cluster.py +42 -23
  8. elasticsearch/_async/client/connector.py +44 -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 +64 -12
  13. elasticsearch/_async/client/features.py +12 -2
  14. elasticsearch/_async/client/fleet.py +23 -19
  15. elasticsearch/_async/client/graph.py +1 -1
  16. elasticsearch/_async/client/ilm.py +30 -22
  17. elasticsearch/_async/client/indices.py +435 -231
  18. elasticsearch/_async/client/inference.py +1906 -61
  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 +145 -121
  24. elasticsearch/_async/client/monitoring.py +1 -1
  25. elasticsearch/_async/client/nodes.py +10 -28
  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 +78 -75
  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 +280 -134
  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 +23 -15
  42. elasticsearch/_async/client/xpack.py +2 -2
  43. elasticsearch/_async/helpers.py +0 -1
  44. elasticsearch/_sync/client/__init__.py +192 -312
  45. elasticsearch/_sync/client/_base.py +1 -2
  46. elasticsearch/_sync/client/async_search.py +14 -14
  47. elasticsearch/_sync/client/autoscaling.py +4 -4
  48. elasticsearch/_sync/client/cat.py +26 -33
  49. elasticsearch/_sync/client/ccr.py +186 -72
  50. elasticsearch/_sync/client/cluster.py +42 -23
  51. elasticsearch/_sync/client/connector.py +44 -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 +64 -12
  56. elasticsearch/_sync/client/features.py +12 -2
  57. elasticsearch/_sync/client/fleet.py +23 -19
  58. elasticsearch/_sync/client/graph.py +1 -1
  59. elasticsearch/_sync/client/ilm.py +30 -22
  60. elasticsearch/_sync/client/indices.py +435 -231
  61. elasticsearch/_sync/client/inference.py +1906 -61
  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 +145 -121
  67. elasticsearch/_sync/client/monitoring.py +1 -1
  68. elasticsearch/_sync/client/nodes.py +10 -28
  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 +78 -75
  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 +280 -134
  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 -40
  85. elasticsearch/_sync/client/watcher.py +23 -15
  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 +237 -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 +230 -0
  102. elasticsearch/dsl/_sync/update_by_query.py +45 -0
  103. elasticsearch/dsl/aggs.py +3734 -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 +4392 -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 +2822 -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 +1053 -0
  124. elasticsearch/dsl/serializer.py +34 -0
  125. elasticsearch/dsl/types.py +6453 -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 +144 -0
  130. elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
  131. elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
  132. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
  133. elasticsearch-9.0.0.dist-info/RECORD +160 -0
  134. elasticsearch/transport.py +0 -57
  135. elasticsearch-8.17.2.dist-info/RECORD +0 -119
  136. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
  137. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
  138. {elasticsearch-8.17.2.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
@@ -44,7 +44,7 @@ class IlmClient(NamespacedClient):
44
44
  You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.</p>
45
45
 
46
46
 
47
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-delete-lifecycle.html>`_
47
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-delete-lifecycle>`_
48
48
 
49
49
  :param name: Identifier for the policy.
50
50
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -92,7 +92,6 @@ class IlmClient(NamespacedClient):
92
92
  only_errors: t.Optional[bool] = None,
93
93
  only_managed: t.Optional[bool] = None,
94
94
  pretty: t.Optional[bool] = None,
95
- timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
96
95
  ) -> ObjectApiResponse[t.Any]:
97
96
  """
98
97
  .. raw:: html
@@ -103,7 +102,7 @@ class IlmClient(NamespacedClient):
103
102
  <p>The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.</p>
104
103
 
105
104
 
106
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-explain-lifecycle.html>`_
105
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-explain-lifecycle>`_
107
106
 
108
107
  :param index: Comma-separated list of data streams, indices, and aliases to target.
109
108
  Supports wildcards (`*`). To target all data streams and indices, use `*`
@@ -116,8 +115,6 @@ class IlmClient(NamespacedClient):
116
115
  while executing the policy, or attempting to use a policy that does not exist.
117
116
  :param only_managed: Filters the returned indices to only indices that are managed
118
117
  by ILM.
119
- :param timeout: Period to wait for a response. If no response is received before
120
- the timeout expires, the request fails and returns an error.
121
118
  """
122
119
  if index in SKIP_IN_PATH:
123
120
  raise ValueError("Empty value passed for parameter 'index'")
@@ -138,8 +135,6 @@ class IlmClient(NamespacedClient):
138
135
  __query["only_managed"] = only_managed
139
136
  if pretty is not None:
140
137
  __query["pretty"] = pretty
141
- if timeout is not None:
142
- __query["timeout"] = timeout
143
138
  __headers = {"accept": "application/json"}
144
139
  return await self.perform_request( # type: ignore[return-value]
145
140
  "GET",
@@ -168,7 +163,7 @@ class IlmClient(NamespacedClient):
168
163
  <p>Get lifecycle policies.</p>
169
164
 
170
165
 
171
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-get-lifecycle.html>`_
166
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-get-lifecycle>`_
172
167
 
173
168
  :param name: Identifier for the policy.
174
169
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -219,11 +214,11 @@ class IlmClient(NamespacedClient):
219
214
  """
220
215
  .. raw:: html
221
216
 
222
- <p>Get the ILM status.
223
- Get the current index lifecycle management status.</p>
217
+ <p>Get the ILM status.</p>
218
+ <p>Get the current index lifecycle management status.</p>
224
219
 
225
220
 
226
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-get-status.html>`_
221
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-get-status>`_
227
222
  """
228
223
  __path_parts: t.Dict[str, str] = {}
229
224
  __path = "/_ilm/status"
@@ -257,6 +252,7 @@ class IlmClient(NamespacedClient):
257
252
  filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
258
253
  human: t.Optional[bool] = None,
259
254
  legacy_template_to_delete: t.Optional[str] = None,
255
+ master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
260
256
  node_attribute: t.Optional[str] = None,
261
257
  pretty: t.Optional[bool] = None,
262
258
  body: t.Optional[t.Dict[str, t.Any]] = None,
@@ -279,12 +275,16 @@ class IlmClient(NamespacedClient):
279
275
  Use the stop ILM and get ILM status APIs to wait until the reported operation mode is <code>STOPPED</code>.</p>
280
276
 
281
277
 
282
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-migrate-to-data-tiers.html>`_
278
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-migrate-to-data-tiers>`_
283
279
 
284
280
  :param dry_run: If true, simulates the migration from node attributes based allocation
285
281
  filters to data tiers, but does not perform the migration. This provides
286
282
  a way to retrieve the indices and ILM policies that need to be migrated.
287
283
  :param legacy_template_to_delete:
284
+ :param master_timeout: The period to wait for a connection to the master node.
285
+ If no response is received before the timeout expires, the request fails
286
+ and returns an error. It can also be set to `-1` to indicate that the request
287
+ should never timeout.
288
288
  :param node_attribute:
289
289
  """
290
290
  __path_parts: t.Dict[str, str] = {}
@@ -299,6 +299,8 @@ class IlmClient(NamespacedClient):
299
299
  __query["filter_path"] = filter_path
300
300
  if human is not None:
301
301
  __query["human"] = human
302
+ if master_timeout is not None:
303
+ __query["master_timeout"] = master_timeout
302
304
  if pretty is not None:
303
305
  __query["pretty"] = pretty
304
306
  if not __body:
@@ -352,7 +354,7 @@ class IlmClient(NamespacedClient):
352
354
  An index cannot move to a step that is not part of its policy.</p>
353
355
 
354
356
 
355
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-move-to-step.html>`_
357
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-move-to-step>`_
356
358
 
357
359
  :param index: The name of the index whose lifecycle step is to change
358
360
  :param current_step: The step that the index is expected to be in.
@@ -420,7 +422,7 @@ class IlmClient(NamespacedClient):
420
422
  <p>NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.</p>
421
423
 
422
424
 
423
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-put-lifecycle.html>`_
425
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-put-lifecycle>`_
424
426
 
425
427
  :param name: Identifier for the policy.
426
428
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -484,7 +486,7 @@ class IlmClient(NamespacedClient):
484
486
  It also stops managing the indices.</p>
485
487
 
486
488
 
487
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-remove-policy.html>`_
489
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-remove-policy>`_
488
490
 
489
491
  :param index: The name of the index to remove policy on
490
492
  """
@@ -530,7 +532,7 @@ class IlmClient(NamespacedClient):
530
532
  Use the explain lifecycle state API to determine whether an index is in the ERROR step.</p>
531
533
 
532
534
 
533
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-retry-policy.html>`_
535
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-retry>`_
534
536
 
535
537
  :param index: The name of the indices (comma-separated) whose failed lifecycle
536
538
  step is to be retry
@@ -578,10 +580,13 @@ class IlmClient(NamespacedClient):
578
580
  Restarting ILM is necessary only when it has been stopped using the stop ILM API.</p>
579
581
 
580
582
 
581
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-start.html>`_
583
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-start>`_
582
584
 
583
- :param master_timeout: Explicit operation timeout for connection to master node
584
- :param timeout: Explicit operation timeout
585
+ :param master_timeout: Period to wait for a connection to the master node. If
586
+ no response is received before the timeout expires, the request fails and
587
+ returns an error.
588
+ :param timeout: Period to wait for a response. If no response is received before
589
+ the timeout expires, the request fails and returns an error.
585
590
  """
586
591
  __path_parts: t.Dict[str, str] = {}
587
592
  __path = "/_ilm/start"
@@ -629,10 +634,13 @@ class IlmClient(NamespacedClient):
629
634
  Use the get ILM status API to check whether ILM is running.</p>
630
635
 
631
636
 
632
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-stop.html>`_
637
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ilm-stop>`_
633
638
 
634
- :param master_timeout: Explicit operation timeout for connection to master node
635
- :param timeout: Explicit operation timeout
639
+ :param master_timeout: Period to wait for a connection to the master node. If
640
+ no response is received before the timeout expires, the request fails and
641
+ returns an error.
642
+ :param timeout: Period to wait for a response. If no response is received before
643
+ the timeout expires, the request fails and returns an error.
636
644
  """
637
645
  __path_parts: t.Dict[str, str] = {}
638
646
  __path = "/_ilm/stop"