elasticsearch 8.18.1__py3-none-any.whl → 8.19.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 (101) hide show
  1. elasticsearch/_async/client/__init__.py +56 -76
  2. elasticsearch/_async/client/async_search.py +5 -9
  3. elasticsearch/_async/client/autoscaling.py +4 -4
  4. elasticsearch/_async/client/cat.py +620 -65
  5. elasticsearch/_async/client/ccr.py +13 -13
  6. elasticsearch/_async/client/cluster.py +31 -22
  7. elasticsearch/_async/client/connector.py +30 -30
  8. elasticsearch/_async/client/dangling_indices.py +3 -3
  9. elasticsearch/_async/client/enrich.py +5 -5
  10. elasticsearch/_async/client/eql.py +13 -5
  11. elasticsearch/_async/client/esql.py +38 -9
  12. elasticsearch/_async/client/features.py +2 -2
  13. elasticsearch/_async/client/fleet.py +13 -13
  14. elasticsearch/_async/client/graph.py +1 -1
  15. elasticsearch/_async/client/ilm.py +11 -11
  16. elasticsearch/_async/client/indices.py +131 -82
  17. elasticsearch/_async/client/inference.py +411 -112
  18. elasticsearch/_async/client/ingest.py +9 -16
  19. elasticsearch/_async/client/license.py +10 -10
  20. elasticsearch/_async/client/logstash.py +3 -3
  21. elasticsearch/_async/client/migration.py +3 -3
  22. elasticsearch/_async/client/ml.py +76 -88
  23. elasticsearch/_async/client/nodes.py +9 -8
  24. elasticsearch/_async/client/query_rules.py +8 -8
  25. elasticsearch/_async/client/rollup.py +8 -8
  26. elasticsearch/_async/client/search_application.py +10 -10
  27. elasticsearch/_async/client/searchable_snapshots.py +4 -4
  28. elasticsearch/_async/client/security.py +72 -80
  29. elasticsearch/_async/client/shutdown.py +3 -3
  30. elasticsearch/_async/client/simulate.py +1 -1
  31. elasticsearch/_async/client/slm.py +9 -9
  32. elasticsearch/_async/client/snapshot.py +19 -13
  33. elasticsearch/_async/client/sql.py +6 -6
  34. elasticsearch/_async/client/ssl.py +1 -1
  35. elasticsearch/_async/client/synonyms.py +7 -7
  36. elasticsearch/_async/client/tasks.py +3 -3
  37. elasticsearch/_async/client/text_structure.py +4 -4
  38. elasticsearch/_async/client/transform.py +9 -9
  39. elasticsearch/_async/client/xpack.py +1 -1
  40. elasticsearch/_sync/client/__init__.py +56 -76
  41. elasticsearch/_sync/client/async_search.py +5 -9
  42. elasticsearch/_sync/client/autoscaling.py +4 -4
  43. elasticsearch/_sync/client/cat.py +620 -65
  44. elasticsearch/_sync/client/ccr.py +13 -13
  45. elasticsearch/_sync/client/cluster.py +31 -22
  46. elasticsearch/_sync/client/connector.py +30 -30
  47. elasticsearch/_sync/client/dangling_indices.py +3 -3
  48. elasticsearch/_sync/client/enrich.py +5 -5
  49. elasticsearch/_sync/client/eql.py +13 -5
  50. elasticsearch/_sync/client/esql.py +38 -9
  51. elasticsearch/_sync/client/features.py +2 -2
  52. elasticsearch/_sync/client/fleet.py +13 -13
  53. elasticsearch/_sync/client/graph.py +1 -1
  54. elasticsearch/_sync/client/ilm.py +11 -11
  55. elasticsearch/_sync/client/indices.py +131 -82
  56. elasticsearch/_sync/client/inference.py +411 -112
  57. elasticsearch/_sync/client/ingest.py +9 -16
  58. elasticsearch/_sync/client/license.py +10 -10
  59. elasticsearch/_sync/client/logstash.py +3 -3
  60. elasticsearch/_sync/client/migration.py +3 -3
  61. elasticsearch/_sync/client/ml.py +76 -88
  62. elasticsearch/_sync/client/nodes.py +9 -8
  63. elasticsearch/_sync/client/query_rules.py +8 -8
  64. elasticsearch/_sync/client/rollup.py +8 -8
  65. elasticsearch/_sync/client/search_application.py +10 -10
  66. elasticsearch/_sync/client/searchable_snapshots.py +4 -4
  67. elasticsearch/_sync/client/security.py +72 -80
  68. elasticsearch/_sync/client/shutdown.py +3 -3
  69. elasticsearch/_sync/client/simulate.py +1 -1
  70. elasticsearch/_sync/client/slm.py +9 -9
  71. elasticsearch/_sync/client/snapshot.py +19 -13
  72. elasticsearch/_sync/client/sql.py +6 -6
  73. elasticsearch/_sync/client/ssl.py +1 -1
  74. elasticsearch/_sync/client/synonyms.py +7 -7
  75. elasticsearch/_sync/client/tasks.py +3 -3
  76. elasticsearch/_sync/client/text_structure.py +4 -4
  77. elasticsearch/_sync/client/transform.py +9 -9
  78. elasticsearch/_sync/client/xpack.py +1 -1
  79. elasticsearch/_version.py +1 -1
  80. elasticsearch/compat.py +5 -0
  81. elasticsearch/dsl/__init__.py +2 -1
  82. elasticsearch/dsl/_async/document.py +1 -1
  83. elasticsearch/dsl/_sync/document.py +1 -1
  84. elasticsearch/dsl/aggs.py +2 -3
  85. elasticsearch/dsl/document_base.py +176 -16
  86. elasticsearch/dsl/field.py +223 -38
  87. elasticsearch/dsl/query.py +49 -4
  88. elasticsearch/dsl/types.py +107 -16
  89. elasticsearch/dsl/utils.py +1 -1
  90. elasticsearch/esql/__init__.py +18 -0
  91. elasticsearch/esql/esql.py +1105 -0
  92. elasticsearch/esql/functions.py +1738 -0
  93. elasticsearch/exceptions.py +2 -0
  94. {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/METADATA +1 -3
  95. elasticsearch-8.19.0.dist-info/RECORD +164 -0
  96. elasticsearch-8.18.1.dist-info/RECORD +0 -163
  97. elasticsearch-8.18.1.dist-info/licenses/LICENSE.txt +0 -175
  98. elasticsearch-8.18.1.dist-info/licenses/NOTICE.txt +0 -559
  99. {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/WHEEL +0 -0
  100. {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/licenses/LICENSE +0 -0
  101. {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/licenses/NOTICE +0 -0
@@ -53,7 +53,7 @@ class ShutdownClient(NamespacedClient):
53
53
  <p>If the operator privileges feature is enabled, you must be an operator to use this API.</p>
54
54
 
55
55
 
56
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-shutdown.html>`_
56
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-shutdown.html>`_
57
57
 
58
58
  :param node_id: The node id of node to be removed from the shutdown state
59
59
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -112,7 +112,7 @@ class ShutdownClient(NamespacedClient):
112
112
  <p>If the operator privileges feature is enabled, you must be an operator to use this API.</p>
113
113
 
114
114
 
115
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-shutdown.html>`_
115
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-shutdown.html>`_
116
116
 
117
117
  :param node_id: Which node for which to retrieve the shutdown status
118
118
  :param master_timeout: Period to wait for a connection to the master node. If
@@ -187,7 +187,7 @@ class ShutdownClient(NamespacedClient):
187
187
  Monitor the node shutdown status to determine when it is safe to stop Elasticsearch.</p>
188
188
 
189
189
 
190
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-shutdown.html>`_
190
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-shutdown.html>`_
191
191
 
192
192
  :param node_id: The node identifier. This parameter is not validated against
193
193
  the cluster's active nodes. This enables you to register a node for shut
@@ -81,7 +81,7 @@ class SimulateClient(NamespacedClient):
81
81
  These will be used in place of the pipeline definitions that are already in the system. This can be used to replace existing pipeline definitions or to create new ones. The pipeline substitutions are used only within this request.</p>
82
82
 
83
83
 
84
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/simulate-ingest-api.html>`_
84
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/simulate-ingest-api.html>`_
85
85
 
86
86
  :param docs: Sample documents to test in the pipeline.
87
87
  :param index: The index to simulate ingesting into. This value can be overridden
@@ -45,7 +45,7 @@ class SlmClient(NamespacedClient):
45
45
  This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.</p>
46
46
 
47
47
 
48
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-delete-policy.html>`_
48
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-delete-policy.html>`_
49
49
 
50
50
  :param policy_id: The id of the snapshot lifecycle policy to remove
51
51
  :param master_timeout: The period to wait for a connection to the master node.
@@ -101,7 +101,7 @@ class SlmClient(NamespacedClient):
101
101
  The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.</p>
102
102
 
103
103
 
104
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-execute-lifecycle.html>`_
104
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-execute-lifecycle.html>`_
105
105
 
106
106
  :param policy_id: The id of the snapshot lifecycle policy to be executed
107
107
  :param master_timeout: The period to wait for a connection to the master node.
@@ -156,7 +156,7 @@ class SlmClient(NamespacedClient):
156
156
  The retention policy is normally applied according to its schedule.</p>
157
157
 
158
158
 
159
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-execute-retention.html>`_
159
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-execute-retention.html>`_
160
160
 
161
161
  :param master_timeout: The period to wait for a connection to the master node.
162
162
  If no response is received before the timeout expires, the request fails
@@ -208,7 +208,7 @@ class SlmClient(NamespacedClient):
208
208
  Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.</p>
209
209
 
210
210
 
211
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-policy.html>`_
211
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-policy.html>`_
212
212
 
213
213
  :param policy_id: Comma-separated list of snapshot lifecycle policies to retrieve
214
214
  :param master_timeout: The period to wait for a connection to the master node.
@@ -265,7 +265,7 @@ class SlmClient(NamespacedClient):
265
265
  Get global and policy-level statistics about actions taken by snapshot lifecycle management.</p>
266
266
 
267
267
 
268
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-stats.html>`_
268
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-stats.html>`_
269
269
 
270
270
  :param master_timeout: Period to wait for a connection to the master node. If
271
271
  no response is received before the timeout expires, the request fails and
@@ -315,7 +315,7 @@ class SlmClient(NamespacedClient):
315
315
  <p>Get the snapshot lifecycle management status.</p>
316
316
 
317
317
 
318
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-get-status.html>`_
318
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-get-status.html>`_
319
319
 
320
320
  :param master_timeout: The period to wait for a connection to the master node.
321
321
  If no response is received before the timeout expires, the request fails
@@ -379,7 +379,7 @@ class SlmClient(NamespacedClient):
379
379
  Only the latest version of a policy is stored.</p>
380
380
 
381
381
 
382
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-put-policy.html>`_
382
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-put-policy.html>`_
383
383
 
384
384
  :param policy_id: The identifier for the snapshot lifecycle policy you want to
385
385
  create or update.
@@ -465,7 +465,7 @@ class SlmClient(NamespacedClient):
465
465
  Manually starting SLM is necessary only if it has been stopped using the stop SLM API.</p>
466
466
 
467
467
 
468
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-start.html>`_
468
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-start.html>`_
469
469
 
470
470
  :param master_timeout: The period to wait for a connection to the master node.
471
471
  If no response is received before the timeout expires, the request fails
@@ -523,7 +523,7 @@ class SlmClient(NamespacedClient):
523
523
  Use the get snapshot lifecycle management status API to see if SLM is running.</p>
524
524
 
525
525
 
526
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/slm-api-stop.html>`_
526
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/slm-api-stop.html>`_
527
527
 
528
528
  :param master_timeout: The period to wait for a connection to the master node.
529
529
  If no response is received before the timeout expires, the request fails
@@ -50,7 +50,7 @@ class SnapshotClient(NamespacedClient):
50
50
  Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
51
51
 
52
52
 
53
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clean-up-snapshot-repo-api.html>`_
53
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clean-up-snapshot-repo-api.html>`_
54
54
 
55
55
  :param name: Snapshot repository to clean up.
56
56
  :param master_timeout: Period to wait for a connection to the master node.
@@ -107,7 +107,7 @@ class SnapshotClient(NamespacedClient):
107
107
  Clone part of all of a snapshot into another snapshot in the same repository.</p>
108
108
 
109
109
 
110
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clone-snapshot-api.html>`_
110
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/clone-snapshot-api.html>`_
111
111
 
112
112
  :param repository: A repository name
113
113
  :param snapshot: The name of the snapshot to clone from
@@ -191,7 +191,7 @@ class SnapshotClient(NamespacedClient):
191
191
  Take a snapshot of a cluster or of data streams and indices.</p>
192
192
 
193
193
 
194
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-snapshot-api.html>`_
194
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/create-snapshot-api.html>`_
195
195
 
196
196
  :param repository: Repository for the snapshot.
197
197
  :param snapshot: Name of the snapshot. Must be unique in the repository.
@@ -301,7 +301,7 @@ class SnapshotClient(NamespacedClient):
301
301
  Ensure there are no cluster blocks (for example, <code>cluster.blocks.read_only</code> and <code>clsuter.blocks.read_only_allow_delete</code> settings) that prevent write access.</p>
302
302
 
303
303
 
304
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/modules-snapshots.html>`_
304
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/modules-snapshots.html>`_
305
305
 
306
306
  :param name: A repository name
307
307
  :param repository:
@@ -357,6 +357,7 @@ class SnapshotClient(NamespacedClient):
357
357
  human: t.Optional[bool] = None,
358
358
  master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
359
359
  pretty: t.Optional[bool] = None,
360
+ wait_for_completion: t.Optional[bool] = None,
360
361
  ) -> ObjectApiResponse[t.Any]:
361
362
  """
362
363
  .. raw:: html
@@ -364,11 +365,14 @@ class SnapshotClient(NamespacedClient):
364
365
  <p>Delete snapshots.</p>
365
366
 
366
367
 
367
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-api.html>`_
368
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-snapshot-api.html>`_
368
369
 
369
370
  :param repository: A repository name
370
371
  :param snapshot: A comma-separated list of snapshot names
371
372
  :param master_timeout: Explicit operation timeout for connection to master node
373
+ :param wait_for_completion: If `true`, the request returns a response when the
374
+ matching snapshots are all deleted. If `false`, the request returns a response
375
+ as soon as the deletes are scheduled.
372
376
  """
373
377
  if repository in SKIP_IN_PATH:
374
378
  raise ValueError("Empty value passed for parameter 'repository'")
@@ -390,6 +394,8 @@ class SnapshotClient(NamespacedClient):
390
394
  __query["master_timeout"] = master_timeout
391
395
  if pretty is not None:
392
396
  __query["pretty"] = pretty
397
+ if wait_for_completion is not None:
398
+ __query["wait_for_completion"] = wait_for_completion
393
399
  __headers = {"accept": "application/json"}
394
400
  return self.perform_request( # type: ignore[return-value]
395
401
  "DELETE",
@@ -420,7 +426,7 @@ class SnapshotClient(NamespacedClient):
420
426
  The snapshots themselves are left untouched and in place.</p>
421
427
 
422
428
 
423
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-snapshot-repo-api.html>`_
429
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-snapshot-repo-api.html>`_
424
430
 
425
431
  :param name: Name of the snapshot repository to unregister. Wildcard (`*`) patterns
426
432
  are supported.
@@ -497,7 +503,7 @@ class SnapshotClient(NamespacedClient):
497
503
  <p>Get snapshot information.</p>
498
504
 
499
505
 
500
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-api.html>`_
506
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-api.html>`_
501
507
 
502
508
  :param repository: Comma-separated list of snapshot repository names used to
503
509
  limit the request. Wildcard (*) expressions are supported.
@@ -612,7 +618,7 @@ class SnapshotClient(NamespacedClient):
612
618
  <p>Get snapshot repository information.</p>
613
619
 
614
620
 
615
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-repo-api.html>`_
621
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-repo-api.html>`_
616
622
 
617
623
  :param name: A comma-separated list of repository names
618
624
  :param local: Return local information, do not retrieve the state from master
@@ -750,7 +756,7 @@ class SnapshotClient(NamespacedClient):
750
756
  Some operations also verify the behavior on small blobs with sizes other than 8 bytes.</p>
751
757
 
752
758
 
753
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/repo-analysis-api.html>`_
759
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/repo-analysis-api.html>`_
754
760
 
755
761
  :param name: The name of the repository.
756
762
  :param blob_count: The total number of blobs to write to the repository during
@@ -877,7 +883,7 @@ class SnapshotClient(NamespacedClient):
877
883
  <p>NOTE: This API may not work correctly in a mixed-version cluster.</p>
878
884
 
879
885
 
880
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-repo-integrity-api.html>`_
886
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/verify-repo-integrity-api.html>`_
881
887
 
882
888
  :param name: A repository name
883
889
  :param blob_thread_pool_concurrency: Number of threads to use for reading blob
@@ -987,7 +993,7 @@ class SnapshotClient(NamespacedClient):
987
993
  <p>If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot.</p>
988
994
 
989
995
 
990
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/restore-snapshot-api.html>`_
996
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/restore-snapshot-api.html>`_
991
997
 
992
998
  :param repository: A repository name
993
999
  :param snapshot: A snapshot name
@@ -1091,7 +1097,7 @@ class SnapshotClient(NamespacedClient):
1091
1097
  These requests can also tax machine resources and, when using cloud storage, incur high processing costs.</p>
1092
1098
 
1093
1099
 
1094
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-snapshot-status-api.html>`_
1100
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-snapshot-status-api.html>`_
1095
1101
 
1096
1102
  :param repository: A repository name
1097
1103
  :param snapshot: A comma-separated list of snapshot names
@@ -1154,7 +1160,7 @@ class SnapshotClient(NamespacedClient):
1154
1160
  Check for common misconfigurations in a snapshot repository.</p>
1155
1161
 
1156
1162
 
1157
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/verify-snapshot-repo-api.html>`_
1163
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/verify-snapshot-repo-api.html>`_
1158
1164
 
1159
1165
  :param name: A repository name
1160
1166
  :param master_timeout: Explicit operation timeout for connection to master node
@@ -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/guide/en/elasticsearch/reference/8.19/clear-sql-cursor-api.html>`_
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/guide/en/elasticsearch/reference/8.19/delete-async-sql-search-api.html>`_
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/guide/en/elasticsearch/reference/8.19/get-async-sql-search-api.html>`_
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/guide/en/elasticsearch/reference/8.19/get-async-sql-search-status-api.html>`_
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/guide/en/elasticsearch/reference/8.19/sql-search-api.html>`_
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/guide/en/elasticsearch/reference/8.19/sql-translate-api.html>`_
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/guide/en/elasticsearch/reference/8.19/security-api-ssl.html>`_
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/guide/en/elasticsearch/reference/8.19/delete-synonyms-set.html>`_
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/guide/en/elasticsearch/reference/8.19/delete-synonym-rule.html>`_
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/guide/en/elasticsearch/reference/8.19/get-synonyms-set.html>`_
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/guide/en/elasticsearch/reference/8.19/get-synonym-rule.html>`_
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/guide/en/elasticsearch/reference/8.19/get-synonyms-set.html>`_
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/guide/en/elasticsearch/reference/8.19/put-synonyms-set.html>`_
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/guide/en/elasticsearch/reference/8.19/put-synonym-rule.html>`_
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/guide/en/elasticsearch/reference/8.19/tasks.html>`_
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/guide/en/elasticsearch/reference/8.19/tasks.html>`_
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/guide/en/elasticsearch/reference/8.19/tasks.html>`_
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/guide/en/elasticsearch/reference/8.19/find-field-structure.html>`_
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/guide/en/elasticsearch/reference/8.19/find-message-structure.html>`_
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/guide/en/elasticsearch/reference/8.19/find-structure.html>`_
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/guide/en/elasticsearch/reference/8.19/test-grok-pattern.html>`_
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/guide/en/elasticsearch/reference/8.19/delete-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/get-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/get-transform-stats.html>`_
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/guide/en/elasticsearch/reference/8.19/preview-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/put-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/reset-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/schedule-now-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/start-transform.html>`_
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/guide/en/elasticsearch/reference/8.19/stop-transform.html>`_
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,
@@ -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/guide/en/elasticsearch/reference/8.19/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
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.1"
18
+ __versionstr__ = "8.19.0"
elasticsearch/compat.py CHANGED
@@ -16,12 +16,15 @@
16
16
  # under the License.
17
17
 
18
18
  import inspect
19
+ import os
19
20
  import sys
20
21
  from pathlib import Path
21
22
  from typing import Tuple, Type, Union
22
23
 
23
24
  string_types: Tuple[Type[str], Type[bytes]] = (str, bytes)
24
25
 
26
+ DISABLE_WARN_STACKLEVEL_ENV_VAR = "DISABLE_WARN_STACKLEVEL"
27
+
25
28
 
26
29
  def to_str(x: Union[str, bytes], encoding: str = "ascii") -> str:
27
30
  if not isinstance(x, str):
@@ -37,6 +40,8 @@ def to_bytes(x: Union[str, bytes], encoding: str = "ascii") -> bytes:
37
40
 
38
41
  def warn_stacklevel() -> int:
39
42
  """Dynamically determine warning stacklevel for warnings based on the call stack"""
43
+ if os.environ.get(DISABLE_WARN_STACKLEVEL_ENV_VAR) in ["1", "true", "True"]:
44
+ return 0
40
45
  try:
41
46
  # Grab the root module from the current module '__name__'
42
47
  module_name = __name__.partition(".")[0]
@@ -19,7 +19,7 @@ from . import async_connections, connections
19
19
  from .aggs import A, Agg
20
20
  from .analysis import analyzer, char_filter, normalizer, token_filter, tokenizer
21
21
  from .document import AsyncDocument, Document
22
- from .document_base import InnerDoc, M, MetaField, mapped_field
22
+ from .document_base import E, InnerDoc, M, MetaField, mapped_field
23
23
  from .exceptions import (
24
24
  ElasticsearchDslException,
25
25
  IllegalOperation,
@@ -135,6 +135,7 @@ __all__ = [
135
135
  "Double",
136
136
  "DoubleRange",
137
137
  "DslBase",
138
+ "E",
138
139
  "ElasticsearchDslException",
139
140
  "EmptySearch",
140
141
  "Facet",
@@ -96,7 +96,7 @@ class AsyncDocument(DocumentBase, metaclass=AsyncIndexMeta):
96
96
 
97
97
  @classmethod
98
98
  def _get_using(cls, using: Optional[AsyncUsingType] = None) -> AsyncUsingType:
99
- return cast(AsyncUsingType, using or cls._index._using)
99
+ return using or cls._index._using
100
100
 
101
101
  @classmethod
102
102
  def _get_connection(
@@ -92,7 +92,7 @@ class Document(DocumentBase, metaclass=IndexMeta):
92
92
 
93
93
  @classmethod
94
94
  def _get_using(cls, using: Optional[UsingType] = None) -> UsingType:
95
- return cast(UsingType, using or cls._index._using)
95
+ return using or cls._index._using
96
96
 
97
97
  @classmethod
98
98
  def _get_connection(cls, using: Optional[UsingType] = None) -> "Elasticsearch":
elasticsearch/dsl/aggs.py CHANGED
@@ -678,9 +678,8 @@ class CategorizeText(Bucket[_R]):
678
678
  :arg categorization_analyzer: The categorization analyzer specifies
679
679
  how the text is analyzed and tokenized before being categorized.
680
680
  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.
681
+ the `_analyze` endpoint. This property cannot be used at the same
682
+ time as categorization_filters.
684
683
  :arg shard_size: The number of categorization buckets to return from
685
684
  each shard before merging all the results.
686
685
  :arg size: The number of buckets to return. Defaults to `10` if