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
@@ -44,7 +44,7 @@ class SqlClient(NamespacedClient):
44
44
  <p>Clear an SQL search cursor.</p>
45
45
 
46
46
 
47
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-sql-cursor-api.html>`_
47
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-clear-cursor>`_
48
48
 
49
49
  :param cursor: Cursor to clear.
50
50
  """
@@ -99,7 +99,7 @@ class SqlClient(NamespacedClient):
99
99
  </ul>
100
100
 
101
101
 
102
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-async-sql-search-api.html>`_
102
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-delete-async>`_
103
103
 
104
104
  :param id: The identifier for the search.
105
105
  """
@@ -150,7 +150,7 @@ class SqlClient(NamespacedClient):
150
150
  <p>If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.</p>
151
151
 
152
152
 
153
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-sql-search-api.html>`_
153
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-get-async>`_
154
154
 
155
155
  :param id: The identifier for the search.
156
156
  :param delimiter: The separator for CSV results. The API supports this parameter
@@ -212,7 +212,7 @@ class SqlClient(NamespacedClient):
212
212
  Get the current status of an async SQL search or a stored synchronous SQL search.</p>
213
213
 
214
214
 
215
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-sql-search-status-api.html>`_
215
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-get-async-status>`_
216
216
 
217
217
  :param id: The identifier for the search.
218
218
  """
@@ -301,7 +301,7 @@ class SqlClient(NamespacedClient):
301
301
  Run an SQL request.</p>
302
302
 
303
303
 
304
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/sql-search-api.html>`_
304
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-query>`_
305
305
 
306
306
  :param allow_partial_search_results: If `true`, the response has partial results
307
307
  when there are shard request timeouts or shard failures. If `false`, the
@@ -427,7 +427,7 @@ class SqlClient(NamespacedClient):
427
427
  It accepts the same request body parameters as the SQL search API, excluding <code>cursor</code>.</p>
428
428
 
429
429
 
430
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/sql-translate-api.html>`_
430
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-translate>`_
431
431
 
432
432
  :param query: The SQL query to run.
433
433
  :param fetch_size: The maximum number of rows (or entries) to return in one response.
@@ -52,7 +52,7 @@ class SslClient(NamespacedClient):
52
52
  <p>If Elasticsearch is configured to use a keystore or truststore, the API output includes all certificates in that store, even though some of the certificates might not be in active use within the cluster.</p>
53
53
 
54
54
 
55
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/security-api-ssl.html>`_
55
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ssl-certificates>`_
56
56
  """
57
57
  __path_parts: t.Dict[str, str] = {}
58
58
  __path = "/_ssl/certificates"
@@ -53,7 +53,7 @@ class SynonymsClient(NamespacedClient):
53
53
  When the synonyms set is not used in analyzers, you will be able to delete it.</p>
54
54
 
55
55
 
56
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonyms-set.html>`_
56
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-delete-synonym>`_
57
57
 
58
58
  :param id: The synonyms set identifier to delete.
59
59
  """
@@ -98,7 +98,7 @@ class SynonymsClient(NamespacedClient):
98
98
  Delete a synonym rule from a synonym set.</p>
99
99
 
100
100
 
101
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-synonym-rule.html>`_
101
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-delete-synonym-rule>`_
102
102
 
103
103
  :param set_id: The ID of the synonym set to update.
104
104
  :param rule_id: The ID of the synonym rule to delete.
@@ -151,7 +151,7 @@ class SynonymsClient(NamespacedClient):
151
151
  <p>Get a synonym set.</p>
152
152
 
153
153
 
154
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html>`_
154
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-get-synonym>`_
155
155
 
156
156
  :param id: The synonyms set identifier to retrieve.
157
157
  :param from_: The starting offset for query rules to retrieve.
@@ -202,7 +202,7 @@ class SynonymsClient(NamespacedClient):
202
202
  Get a synonym rule from a synonym set.</p>
203
203
 
204
204
 
205
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html>`_
205
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-get-synonym-rule>`_
206
206
 
207
207
  :param set_id: The ID of the synonym set to retrieve the synonym rule from.
208
208
  :param rule_id: The ID of the synonym rule to retrieve.
@@ -255,7 +255,7 @@ class SynonymsClient(NamespacedClient):
255
255
  Get a summary of all defined synonym sets.</p>
256
256
 
257
257
 
258
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonyms-set.html>`_
258
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-get-synonym>`_
259
259
 
260
260
  :param from_: The starting offset for synonyms sets to retrieve.
261
261
  :param size: The maximum number of synonyms sets to retrieve.
@@ -311,7 +311,7 @@ class SynonymsClient(NamespacedClient):
311
311
  This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.</p>
312
312
 
313
313
 
314
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonyms-set.html>`_
314
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-put-synonym>`_
315
315
 
316
316
  :param id: The ID of the synonyms set to be created or updated.
317
317
  :param synonyms_set: The synonym rules definitions for the synonyms set.
@@ -370,7 +370,7 @@ class SynonymsClient(NamespacedClient):
370
370
  <p>When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.</p>
371
371
 
372
372
 
373
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-synonym-rule.html>`_
373
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-put-synonym-rule>`_
374
374
 
375
375
  :param set_id: The ID of the synonym set.
376
376
  :param rule_id: The ID of the synonym rule to be updated or created.
@@ -60,7 +60,7 @@ class TasksClient(NamespacedClient):
60
60
  You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.</p>
61
61
 
62
62
 
63
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/tasks.html>`_
63
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-tasks>`_
64
64
 
65
65
  :param task_id: The task identifier.
66
66
  :param actions: A comma-separated list or wildcard expression of actions that
@@ -128,7 +128,7 @@ class TasksClient(NamespacedClient):
128
128
  <p>If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.</p>
129
129
 
130
130
 
131
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/tasks.html>`_
131
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-tasks>`_
132
132
 
133
133
  :param task_id: The task identifier.
134
134
  :param timeout: The period to wait for a response. If no response is received
@@ -238,7 +238,7 @@ class TasksClient(NamespacedClient):
238
238
  The <code>X-Opaque-Id</code> in the children <code>headers</code> is the child task of the task that was initiated by the REST request.</p>
239
239
 
240
240
 
241
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/tasks.html>`_
241
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-tasks>`_
242
242
 
243
243
  :param actions: A comma-separated list or wildcard expression of actions used
244
244
  to limit the request. For example, you can use `cluser:*` to retrieve all
@@ -72,7 +72,7 @@ class TextStructureClient(NamespacedClient):
72
72
  It helps determine why the returned structure was chosen.</p>
73
73
 
74
74
 
75
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-field-structure.html>`_
75
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-text_structure>`_
76
76
 
77
77
  :param field: The field that should be analyzed.
78
78
  :param index: The name of the index that contains the analyzed field.
@@ -259,7 +259,7 @@ class TextStructureClient(NamespacedClient):
259
259
  It helps determine why the returned structure was chosen.</p>
260
260
 
261
261
 
262
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-message-structure.html>`_
262
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-text-structure-find-message-structure>`_
263
263
 
264
264
  :param messages: The list of messages you want to analyze.
265
265
  :param column_names: If the format is `delimited`, you can specify the column
@@ -433,7 +433,7 @@ class TextStructureClient(NamespacedClient):
433
433
  However, you can optionally override some of the decisions about the text structure by specifying one or more query parameters.</p>
434
434
 
435
435
 
436
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/find-structure.html>`_
436
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-text-structure-find-structure>`_
437
437
 
438
438
  :param text_files:
439
439
  :param charset: The text's character set. It must be a character set that is
@@ -620,7 +620,7 @@ class TextStructureClient(NamespacedClient):
620
620
  The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.</p>
621
621
 
622
622
 
623
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/test-grok-pattern.html>`_
623
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-text-structure-test-grok-pattern>`_
624
624
 
625
625
  :param grok_pattern: The Grok pattern to run on the text.
626
626
  :param text: The lines of text to run the Grok pattern on.
@@ -44,7 +44,7 @@ class TransformClient(NamespacedClient):
44
44
  <p>Delete a transform.</p>
45
45
 
46
46
 
47
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-transform.html>`_
47
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-delete-transform>`_
48
48
 
49
49
  :param transform_id: Identifier for the transform.
50
50
  :param delete_dest_index: If this value is true, the destination index is deleted
@@ -108,7 +108,7 @@ class TransformClient(NamespacedClient):
108
108
  Get configuration information for transforms.</p>
109
109
 
110
110
 
111
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform.html>`_
111
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-get-transform>`_
112
112
 
113
113
  :param transform_id: Identifier for the transform. It can be a transform identifier
114
114
  or a wildcard expression. You can get information for all transforms by using
@@ -181,7 +181,7 @@ class TransformClient(NamespacedClient):
181
181
  <p>Get usage information for transforms.</p>
182
182
 
183
183
 
184
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-transform-stats.html>`_
184
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-get-transform-stats>`_
185
185
 
186
186
  :param transform_id: Identifier for the transform. It can be a transform identifier
187
187
  or a wildcard expression. You can get information for all transforms by using
@@ -269,7 +269,7 @@ class TransformClient(NamespacedClient):
269
269
  types of the source index and the transform aggregations.</p>
270
270
 
271
271
 
272
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/preview-transform.html>`_
272
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-preview-transform>`_
273
273
 
274
274
  :param transform_id: Identifier for the transform to preview. If you specify
275
275
  this path parameter, you cannot provide transform configuration details in
@@ -406,7 +406,7 @@ class TransformClient(NamespacedClient):
406
406
  give users any privileges on <code>.data-frame-internal*</code> indices.</p>
407
407
 
408
408
 
409
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-transform.html>`_
409
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-put-transform>`_
410
410
 
411
411
  :param transform_id: Identifier for the transform. This identifier can contain
412
412
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -512,7 +512,7 @@ class TransformClient(NamespacedClient):
512
512
  If the destination index was created by the transform, it is deleted.</p>
513
513
 
514
514
 
515
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-transform.html>`_
515
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-reset-transform>`_
516
516
 
517
517
  :param transform_id: Identifier for the transform. This identifier can contain
518
518
  lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
@@ -572,7 +572,7 @@ class TransformClient(NamespacedClient):
572
572
  is called again in the meantime.</p>
573
573
 
574
574
 
575
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/schedule-now-transform.html>`_
575
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-schedule-now-transform>`_
576
576
 
577
577
  :param transform_id: Identifier for the transform.
578
578
  :param timeout: Controls the time to wait for the scheduling to take place
@@ -635,7 +635,7 @@ class TransformClient(NamespacedClient):
635
635
  destination indices, the transform fails when it attempts unauthorized operations.</p>
636
636
 
637
637
 
638
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/start-transform.html>`_
638
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-start-transform>`_
639
639
 
640
640
  :param transform_id: Identifier for the transform.
641
641
  :param from_: Restricts the set of transformed entities to those changed after
@@ -693,7 +693,7 @@ class TransformClient(NamespacedClient):
693
693
  Stops one or more transforms.</p>
694
694
 
695
695
 
696
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/stop-transform.html>`_
696
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-stop-transform>`_
697
697
 
698
698
  :param transform_id: Identifier for the transform. To stop multiple transforms,
699
699
  use a comma-separated list or a wildcard expression. To stop all transforms,
@@ -795,7 +795,7 @@ class TransformClient(NamespacedClient):
795
795
  time of update and runs with those privileges.</p>
796
796
 
797
797
 
798
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-transform.html>`_
798
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-update-transform>`_
799
799
 
800
800
  :param transform_id: Identifier for the transform.
801
801
  :param defer_validation: When true, deferrable validations are not run. This
@@ -890,7 +890,7 @@ class TransformClient(NamespacedClient):
890
890
  You may want to perform a recent cluster backup prior to the upgrade.</p>
891
891
 
892
892
 
893
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/upgrade-transforms.html>`_
893
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-upgrade-transforms>`_
894
894
 
895
895
  :param dry_run: When true, the request checks for updates but does not run them.
896
896
  :param timeout: Period to wait for a response. If no response is received before
@@ -181,8 +181,6 @@ def host_mapping_to_node_config(host: Mapping[str, Union[str, int]]) -> NodeConf
181
181
  "host",
182
182
  "port",
183
183
  "path_prefix",
184
- "url_prefix",
185
- "use_ssl",
186
184
  }
187
185
  disallowed_keys = set(host.keys()).difference(allow_hosts_keys)
188
186
  if disallowed_keys:
@@ -196,41 +194,6 @@ def host_mapping_to_node_config(host: Mapping[str, Union[str, int]]) -> NodeConf
196
194
 
197
195
  options = dict(host)
198
196
 
199
- # Handle the deprecated option 'use_ssl'
200
- if "use_ssl" in options:
201
- use_ssl = options.pop("use_ssl")
202
- if not isinstance(use_ssl, bool):
203
- raise TypeError("'use_ssl' must be of type 'bool'")
204
-
205
- # Ensure the user isn't specifying scheme=http use_ssl=True or vice-versa
206
- if "scheme" in options and (options["scheme"] == "https") != use_ssl:
207
- raise ValueError(
208
- f"Cannot specify conflicting options 'scheme={options['scheme']}' "
209
- f"and 'use_ssl={use_ssl}'. Use 'scheme' only instead"
210
- )
211
-
212
- warnings.warn(
213
- "The 'use_ssl' option is no longer needed as specifying a 'scheme' is now required",
214
- category=DeprecationWarning,
215
- stacklevel=warn_stacklevel(),
216
- )
217
- options.setdefault("scheme", "https" if use_ssl else "http")
218
-
219
- # Handle the deprecated option 'url_prefix'
220
- if "url_prefix" in options:
221
- if "path_prefix" in options:
222
- raise ValueError(
223
- "Cannot specify conflicting options 'url_prefix' and "
224
- "'path_prefix'. Use 'path_prefix' only instead"
225
- )
226
-
227
- warnings.warn(
228
- "The 'url_prefix' option is deprecated in favor of 'path_prefix'",
229
- category=DeprecationWarning,
230
- stacklevel=warn_stacklevel(),
231
- )
232
- options["path_prefix"] = options.pop("url_prefix")
233
-
234
197
  return NodeConfig(**options) # type: ignore[arg-type]
235
198
 
236
199
 
@@ -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.18/watcher-api-ack-watch.html>`_
51
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-ack-watch>`_
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.18/watcher-api-activate-watch.html>`_
107
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-activate-watch>`_
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.18/watcher-api-deactivate-watch.html>`_
151
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-deactivate-watch>`_
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.18/watcher-api-delete-watch.html>`_
199
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-delete-watch>`_
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.18/watcher-api-execute-watch.html>`_
280
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-execute-watch>`_
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.18/watcher-api-get-settings.html>`_
368
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-get-settings>`_
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.18/watcher-api-get-watch.html>`_
413
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-get-watch>`_
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.18/watcher-api-put-watch.html>`_
488
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-put-watch>`_
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.
@@ -579,7 +579,7 @@ class WatcherClient(NamespacedClient):
579
579
  pretty: t.Optional[bool] = None,
580
580
  query: t.Optional[t.Mapping[str, t.Any]] = None,
581
581
  search_after: t.Optional[
582
- t.Sequence[t.Union[None, bool, float, int, str, t.Any]]
582
+ t.Sequence[t.Union[None, bool, float, int, str]]
583
583
  ] = None,
584
584
  size: t.Optional[int] = None,
585
585
  sort: t.Optional[
@@ -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.18/watcher-api-query-watches.html>`_
601
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-query-watches>`_
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.
@@ -673,7 +673,7 @@ class WatcherClient(NamespacedClient):
673
673
  Start the Watcher service if it is not already running.</p>
674
674
 
675
675
 
676
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-start.html>`_
676
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-start>`_
677
677
 
678
678
  :param master_timeout: Period to wait for a connection to the master node.
679
679
  """
@@ -739,7 +739,7 @@ class WatcherClient(NamespacedClient):
739
739
  You retrieve more metrics by using the metric parameter.</p>
740
740
 
741
741
 
742
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stats.html>`_
742
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-stats>`_
743
743
 
744
744
  :param metric: Defines which additional metrics are included in the response.
745
745
  :param emit_stacktraces: Defines whether stack traces are generated for each
@@ -790,7 +790,7 @@ class WatcherClient(NamespacedClient):
790
790
  Stop the Watcher service if it is running.</p>
791
791
 
792
792
 
793
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-stop.html>`_
793
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-stop>`_
794
794
 
795
795
  :param master_timeout: The period to wait for the master node. If the master
796
796
  node is not available before the timeout expires, the request fails and returns
@@ -851,7 +851,7 @@ class WatcherClient(NamespacedClient):
851
851
  Watcher shards must always be in the <code>data_content</code> tier.</p>
852
852
 
853
853
 
854
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-update-settings.html>`_
854
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-update-settings>`_
855
855
 
856
856
  :param index_auto_expand_replicas:
857
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.18/info-api.html>`_
57
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-info>`_
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.18/usage-api.html>`_
106
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-xpack>`_
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.18.0"
18
+ __versionstr__ = "9.0.1"
@@ -107,9 +107,9 @@ class AsyncSearch(SearchBase[_R]):
107
107
  Turn the search into a scan search and return a generator that will
108
108
  iterate over all the documents matching the query.
109
109
 
110
- Use ``params`` method to specify any additional arguments you with to
110
+ Use the ``params`` method to specify any additional arguments you wish to
111
111
  pass to the underlying ``scan`` helper from ``elasticsearch-py`` -
112
- https://elasticsearch-py.readthedocs.io/en/master/helpers.html#elasticsearch.helpers.scan
112
+ https://elasticsearch-py.readthedocs.io/en/latest/helpers.html#scan
113
113
 
114
114
  The ``iterate()`` method should be preferred, as it provides similar
115
115
  functionality using an Elasticsearch point in time.
@@ -123,7 +123,11 @@ class AsyncSearch(SearchBase[_R]):
123
123
 
124
124
  async def delete(self) -> AttrDict[Any]:
125
125
  """
126
- delete() executes the query by delegating to delete_by_query()
126
+ ``delete()`` executes the query by delegating to ``delete_by_query()``.
127
+
128
+ Use the ``params`` method to specify any additional arguments you wish to
129
+ pass to the underlying ``delete_by_query`` helper from ``elasticsearch-py`` -
130
+ https://elasticsearch-py.readthedocs.io/en/latest/api/elasticsearch.html#elasticsearch.Elasticsearch.delete_by_query
127
131
  """
128
132
 
129
133
  es = get_connection(self._using)
@@ -104,9 +104,9 @@ class Search(SearchBase[_R]):
104
104
  Turn the search into a scan search and return a generator that will
105
105
  iterate over all the documents matching the query.
106
106
 
107
- Use ``params`` method to specify any additional arguments you with to
107
+ Use the ``params`` method to specify any additional arguments you wish to
108
108
  pass to the underlying ``scan`` helper from ``elasticsearch-py`` -
109
- https://elasticsearch-py.readthedocs.io/en/master/helpers.html#elasticsearch.helpers.scan
109
+ https://elasticsearch-py.readthedocs.io/en/latest/helpers.html#scan
110
110
 
111
111
  The ``iterate()`` method should be preferred, as it provides similar
112
112
  functionality using an Elasticsearch point in time.
@@ -118,7 +118,11 @@ class Search(SearchBase[_R]):
118
118
 
119
119
  def delete(self) -> AttrDict[Any]:
120
120
  """
121
- delete() executes the query by delegating to delete_by_query()
121
+ ``delete()`` executes the query by delegating to ``delete_by_query()``.
122
+
123
+ Use the ``params`` method to specify any additional arguments you wish to
124
+ pass to the underlying ``delete_by_query`` helper from ``elasticsearch-py`` -
125
+ https://elasticsearch-py.readthedocs.io/en/latest/api/elasticsearch.html#elasticsearch.Elasticsearch.delete_by_query
122
126
  """
123
127
 
124
128
  es = get_connection(self._using)
elasticsearch/dsl/aggs.py CHANGED
@@ -35,6 +35,7 @@ from typing import (
35
35
 
36
36
  from elastic_transport.client_utils import DEFAULT
37
37
 
38
+ from . import wrappers
38
39
  from .query import Query
39
40
  from .response.aggs import AggResponse, BucketData, FieldBucketData, TopHitsData
40
41
  from .utils import _R, AttrDict, DslBase
@@ -678,9 +679,8 @@ class CategorizeText(Bucket[_R]):
678
679
  :arg categorization_analyzer: The categorization analyzer specifies
679
680
  how the text is analyzed and tokenized before being categorized.
680
681
  The syntax is very similar to that used to define the analyzer in
681
- the [Analyze endpoint](https://www.elastic.co/guide/en/elasticsear
682
- ch/reference/8.0/indices-analyze.html). This property cannot be
683
- used at the same time as categorization_filters.
682
+ the analyze API. This property cannot be used at the same time as
683
+ `categorization_filters`.
684
684
  :arg shard_size: The number of categorization buckets to return from
685
685
  each shard before merging all the results.
686
686
  :arg size: The number of buckets to return. Defaults to `10` if
@@ -761,7 +761,7 @@ class Composite(Bucket[_R]):
761
761
  *,
762
762
  after: Union[
763
763
  Mapping[
764
- Union[str, "InstrumentedField"], Union[int, float, str, bool, None, Any]
764
+ Union[str, "InstrumentedField"], Union[int, float, str, bool, None]
765
765
  ],
766
766
  "DefaultType",
767
767
  ] = DEFAULT,
@@ -958,7 +958,7 @@ class DateRange(Bucket[_R]):
958
958
  format: Union[str, "DefaultType"] = DEFAULT,
959
959
  missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT,
960
960
  ranges: Union[
961
- Sequence["types.DateRangeExpression"],
961
+ Sequence["wrappers.AggregationRange"],
962
962
  Sequence[Dict[str, Any]],
963
963
  "DefaultType",
964
964
  ] = DEFAULT,
@@ -1347,7 +1347,9 @@ class GeoDistance(Bucket[_R]):
1347
1347
  "DefaultType",
1348
1348
  ] = DEFAULT,
1349
1349
  ranges: Union[
1350
- Sequence["types.AggregationRange"], Sequence[Dict[str, Any]], "DefaultType"
1350
+ Sequence["wrappers.AggregationRange"],
1351
+ Sequence[Dict[str, Any]],
1352
+ "DefaultType",
1351
1353
  ] = DEFAULT,
1352
1354
  unit: Union[
1353
1355
  Literal["in", "ft", "yd", "mi", "nmi", "km", "m", "cm", "mm"], "DefaultType"
@@ -2657,7 +2659,9 @@ class Range(Bucket[_R]):
2657
2659
  field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
2658
2660
  missing: Union[int, "DefaultType"] = DEFAULT,
2659
2661
  ranges: Union[
2660
- Sequence["types.AggregationRange"], Sequence[Dict[str, Any]], "DefaultType"
2662
+ Sequence["wrappers.AggregationRange"],
2663
+ Sequence[Dict[str, Any]],
2664
+ "DefaultType",
2661
2665
  ] = DEFAULT,
2662
2666
  script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
2663
2667
  keyed: Union[bool, "DefaultType"] = DEFAULT,
@@ -42,7 +42,7 @@ if TYPE_CHECKING:
42
42
  from .response.aggs import BucketData
43
43
  from .search_base import SearchBase
44
44
 
45
- FilterValueType = Union[str, datetime, Sequence[str]]
45
+ FilterValueType = Union[str, int, float, bool]
46
46
 
47
47
  __all__ = [
48
48
  "FacetedSearchBase",
@@ -396,10 +396,10 @@ class FacetedSearchBase(Generic[_R]):
396
396
  ]
397
397
 
398
398
  # remember the filter values for use in FacetedResponse
399
- self.filter_values[name] = filter_values # type: ignore[assignment]
399
+ self.filter_values[name] = filter_values
400
400
 
401
401
  # get the filter from the facet
402
- f = self.facets[name].add_filter(filter_values) # type: ignore[arg-type]
402
+ f = self.facets[name].add_filter(filter_values)
403
403
  if f is None:
404
404
  return
405
405
 
@@ -469,7 +469,7 @@ class FacetedSearchBase(Generic[_R]):
469
469
  """
470
470
  Specify query params to be used when executing the search. All the
471
471
  keyword arguments will override the current values. See
472
- https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.search
472
+ https://elasticsearch-py.readthedocs.io/en/latest/api/elasticsearch.html#elasticsearch.Elasticsearch.search
473
473
  for all available parameters.
474
474
  """
475
475
  self._s = self._s.params(**kwargs)