elasticsearch9 9.0.4__py3-none-any.whl → 9.1.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 (95) hide show
  1. elasticsearch9/__init__.py +3 -3
  2. elasticsearch9/_async/client/__init__.py +42 -42
  3. elasticsearch9/_async/client/async_search.py +4 -4
  4. elasticsearch9/_async/client/autoscaling.py +4 -4
  5. elasticsearch9/_async/client/cat.py +26 -26
  6. elasticsearch9/_async/client/ccr.py +13 -13
  7. elasticsearch9/_async/client/cluster.py +25 -20
  8. elasticsearch9/_async/client/connector.py +30 -30
  9. elasticsearch9/_async/client/dangling_indices.py +3 -3
  10. elasticsearch9/_async/client/enrich.py +5 -5
  11. elasticsearch9/_async/client/eql.py +4 -4
  12. elasticsearch9/_async/client/esql.py +112 -5
  13. elasticsearch9/_async/client/features.py +2 -2
  14. elasticsearch9/_async/client/fleet.py +3 -3
  15. elasticsearch9/_async/client/graph.py +1 -1
  16. elasticsearch9/_async/client/ilm.py +11 -11
  17. elasticsearch9/_async/client/indices.py +504 -69
  18. elasticsearch9/_async/client/inference.py +419 -46
  19. elasticsearch9/_async/client/ingest.py +9 -9
  20. elasticsearch9/_async/client/license.py +7 -7
  21. elasticsearch9/_async/client/logstash.py +3 -3
  22. elasticsearch9/_async/client/migration.py +3 -3
  23. elasticsearch9/_async/client/ml.py +72 -73
  24. elasticsearch9/_async/client/nodes.py +7 -7
  25. elasticsearch9/_async/client/query_rules.py +8 -8
  26. elasticsearch9/_async/client/rollup.py +8 -8
  27. elasticsearch9/_async/client/search_application.py +10 -10
  28. elasticsearch9/_async/client/searchable_snapshots.py +4 -4
  29. elasticsearch9/_async/client/security.py +68 -64
  30. elasticsearch9/_async/client/shutdown.py +3 -3
  31. elasticsearch9/_async/client/simulate.py +1 -1
  32. elasticsearch9/_async/client/slm.py +9 -9
  33. elasticsearch9/_async/client/snapshot.py +58 -21
  34. elasticsearch9/_async/client/sql.py +6 -6
  35. elasticsearch9/_async/client/ssl.py +1 -1
  36. elasticsearch9/_async/client/synonyms.py +25 -7
  37. elasticsearch9/_async/client/tasks.py +4 -4
  38. elasticsearch9/_async/client/text_structure.py +4 -4
  39. elasticsearch9/_async/client/transform.py +11 -11
  40. elasticsearch9/_async/client/watcher.py +13 -13
  41. elasticsearch9/_async/client/xpack.py +2 -2
  42. elasticsearch9/_otel.py +8 -8
  43. elasticsearch9/_sync/client/__init__.py +42 -42
  44. elasticsearch9/_sync/client/async_search.py +4 -4
  45. elasticsearch9/_sync/client/autoscaling.py +4 -4
  46. elasticsearch9/_sync/client/cat.py +26 -26
  47. elasticsearch9/_sync/client/ccr.py +13 -13
  48. elasticsearch9/_sync/client/cluster.py +25 -20
  49. elasticsearch9/_sync/client/connector.py +30 -30
  50. elasticsearch9/_sync/client/dangling_indices.py +3 -3
  51. elasticsearch9/_sync/client/enrich.py +5 -5
  52. elasticsearch9/_sync/client/eql.py +4 -4
  53. elasticsearch9/_sync/client/esql.py +112 -5
  54. elasticsearch9/_sync/client/features.py +2 -2
  55. elasticsearch9/_sync/client/fleet.py +3 -3
  56. elasticsearch9/_sync/client/graph.py +1 -1
  57. elasticsearch9/_sync/client/ilm.py +11 -11
  58. elasticsearch9/_sync/client/indices.py +504 -69
  59. elasticsearch9/_sync/client/inference.py +419 -46
  60. elasticsearch9/_sync/client/ingest.py +9 -9
  61. elasticsearch9/_sync/client/license.py +7 -7
  62. elasticsearch9/_sync/client/logstash.py +3 -3
  63. elasticsearch9/_sync/client/migration.py +3 -3
  64. elasticsearch9/_sync/client/ml.py +72 -73
  65. elasticsearch9/_sync/client/nodes.py +7 -7
  66. elasticsearch9/_sync/client/query_rules.py +8 -8
  67. elasticsearch9/_sync/client/rollup.py +8 -8
  68. elasticsearch9/_sync/client/search_application.py +10 -10
  69. elasticsearch9/_sync/client/searchable_snapshots.py +4 -4
  70. elasticsearch9/_sync/client/security.py +68 -64
  71. elasticsearch9/_sync/client/shutdown.py +3 -3
  72. elasticsearch9/_sync/client/simulate.py +1 -1
  73. elasticsearch9/_sync/client/slm.py +9 -9
  74. elasticsearch9/_sync/client/snapshot.py +58 -21
  75. elasticsearch9/_sync/client/sql.py +6 -6
  76. elasticsearch9/_sync/client/ssl.py +1 -1
  77. elasticsearch9/_sync/client/synonyms.py +25 -7
  78. elasticsearch9/_sync/client/tasks.py +4 -4
  79. elasticsearch9/_sync/client/text_structure.py +4 -4
  80. elasticsearch9/_sync/client/transform.py +11 -11
  81. elasticsearch9/_sync/client/watcher.py +13 -13
  82. elasticsearch9/_sync/client/xpack.py +2 -2
  83. elasticsearch9/_version.py +1 -1
  84. elasticsearch9/dsl/aggs.py +20 -0
  85. elasticsearch9/dsl/document_base.py +2 -3
  86. elasticsearch9/dsl/field.py +18 -0
  87. elasticsearch9/dsl/query.py +1 -1
  88. elasticsearch9/dsl/response/__init__.py +1 -1
  89. elasticsearch9/dsl/types.py +163 -5
  90. {elasticsearch9-9.0.4.dist-info → elasticsearch9-9.1.1.dist-info}/METADATA +3 -4
  91. elasticsearch9-9.1.1.dist-info/RECORD +163 -0
  92. elasticsearch9-9.0.4.dist-info/RECORD +0 -163
  93. {elasticsearch9-9.0.4.dist-info → elasticsearch9-9.1.1.dist-info}/WHEEL +0 -0
  94. {elasticsearch9-9.0.4.dist-info → elasticsearch9-9.1.1.dist-info}/licenses/LICENSE +0 -0
  95. {elasticsearch9-9.0.4.dist-info → elasticsearch9-9.1.1.dist-info}/licenses/NOTICE +0 -0
@@ -44,7 +44,7 @@ class TransformClient(NamespacedClient):
44
44
  <p>Delete a transform.</p>
45
45
 
46
46
 
47
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-delete-transform>`_
47
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/operation/operation-transform-get-transform>`_
111
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/operation/operation-transform-get-transform-stats>`_
184
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/operation/operation-transform-preview-transform>`_
272
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/operation/operation-transform-put-transform>`_
409
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/operation/operation-transform-reset-transform>`_
515
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/operation/operation-transform-schedule-now-transform>`_
575
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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
@@ -695,7 +695,7 @@ class TransformClient(NamespacedClient):
695
695
  destination indices, the transform fails when it attempts unauthorized operations.</p>
696
696
 
697
697
 
698
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-start-transform>`_
698
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-start-transform>`_
699
699
 
700
700
  :param transform_id: Identifier for the transform.
701
701
  :param from_: Restricts the set of transformed entities to those changed after
@@ -753,7 +753,7 @@ class TransformClient(NamespacedClient):
753
753
  Stops one or more transforms.</p>
754
754
 
755
755
 
756
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-stop-transform>`_
756
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform>`_
757
757
 
758
758
  :param transform_id: Identifier for the transform. To stop multiple transforms,
759
759
  use a comma-separated list or a wildcard expression. To stop all transforms,
@@ -855,7 +855,7 @@ class TransformClient(NamespacedClient):
855
855
  time of update and runs with those privileges.</p>
856
856
 
857
857
 
858
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-update-transform>`_
858
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform>`_
859
859
 
860
860
  :param transform_id: Identifier for the transform.
861
861
  :param defer_validation: When true, deferrable validations are not run. This
@@ -950,7 +950,7 @@ class TransformClient(NamespacedClient):
950
950
  You may want to perform a recent cluster backup prior to the upgrade.</p>
951
951
 
952
952
 
953
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-transform-upgrade-transforms>`_
953
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms>`_
954
954
 
955
955
  :param dry_run: When true, the request checks for updates but does not run them.
956
956
  :param timeout: Period to wait for a response. If no response is received before
@@ -49,7 +49,7 @@ class WatcherClient(NamespacedClient):
49
49
  To demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.</p>
50
50
 
51
51
 
52
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-ack-watch>`_
52
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch>`_
53
53
 
54
54
  :param watch_id: The watch identifier.
55
55
  :param action_id: A comma-separated list of the action identifiers to acknowledge.
@@ -105,7 +105,7 @@ class WatcherClient(NamespacedClient):
105
105
  A watch can be either active or inactive.</p>
106
106
 
107
107
 
108
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-activate-watch>`_
108
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch>`_
109
109
 
110
110
  :param watch_id: The watch identifier.
111
111
  """
@@ -149,7 +149,7 @@ class WatcherClient(NamespacedClient):
149
149
  A watch can be either active or inactive.</p>
150
150
 
151
151
 
152
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-deactivate-watch>`_
152
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch>`_
153
153
 
154
154
  :param watch_id: The watch identifier.
155
155
  """
@@ -197,7 +197,7 @@ class WatcherClient(NamespacedClient):
197
197
  When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the <code>.watches</code> index.</p>
198
198
 
199
199
 
200
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-delete-watch>`_
200
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch>`_
201
201
 
202
202
  :param id: The watch identifier.
203
203
  """
@@ -279,7 +279,7 @@ class WatcherClient(NamespacedClient):
279
279
  Refer to the external documentation for examples of watch execution requests, including existing, customized, and inline watches.</p>
280
280
 
281
281
 
282
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-execute-watch>`_
282
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch>`_
283
283
 
284
284
  :param id: The watch identifier.
285
285
  :param action_modes: Determines how to handle the watch actions as part of the
@@ -367,7 +367,7 @@ class WatcherClient(NamespacedClient):
367
367
  Only a subset of settings are shown, for example <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
368
368
 
369
369
 
370
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-get-settings>`_
370
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings>`_
371
371
 
372
372
  :param master_timeout: The period to wait for a connection to the master node.
373
373
  If no response is received before the timeout expires, the request fails
@@ -412,7 +412,7 @@ class WatcherClient(NamespacedClient):
412
412
  <p>Get a watch.</p>
413
413
 
414
414
 
415
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-get-watch>`_
415
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch>`_
416
416
 
417
417
  :param id: The watch identifier.
418
418
  """
@@ -487,7 +487,7 @@ class WatcherClient(NamespacedClient):
487
487
  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>
488
488
 
489
489
 
490
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-put-watch>`_
490
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch>`_
491
491
 
492
492
  :param id: The identifier for the watch.
493
493
  :param actions: The list of actions that will be run if the condition matches.
@@ -600,7 +600,7 @@ class WatcherClient(NamespacedClient):
600
600
  <p>Note that only the <code>_id</code> and <code>metadata.*</code> fields are queryable or sortable.</p>
601
601
 
602
602
 
603
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-query-watches>`_
603
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches>`_
604
604
 
605
605
  :param from_: The offset from the first result to fetch. It must be non-negative.
606
606
  :param query: A query that filters the watches to be returned.
@@ -675,7 +675,7 @@ class WatcherClient(NamespacedClient):
675
675
  Start the Watcher service if it is not already running.</p>
676
676
 
677
677
 
678
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-start>`_
678
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start>`_
679
679
 
680
680
  :param master_timeout: Period to wait for a connection to the master node.
681
681
  """
@@ -741,7 +741,7 @@ class WatcherClient(NamespacedClient):
741
741
  You retrieve more metrics by using the metric parameter.</p>
742
742
 
743
743
 
744
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-stats>`_
744
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats>`_
745
745
 
746
746
  :param metric: Defines which additional metrics are included in the response.
747
747
  :param emit_stacktraces: Defines whether stack traces are generated for each
@@ -792,7 +792,7 @@ class WatcherClient(NamespacedClient):
792
792
  Stop the Watcher service if it is running.</p>
793
793
 
794
794
 
795
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-stop>`_
795
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop>`_
796
796
 
797
797
  :param master_timeout: The period to wait for the master node. If the master
798
798
  node is not available before the timeout expires, the request fails and returns
@@ -853,7 +853,7 @@ class WatcherClient(NamespacedClient):
853
853
  Watcher shards must always be in the <code>data_content</code> tier.</p>
854
854
 
855
855
 
856
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-update-settings>`_
856
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings>`_
857
857
 
858
858
  :param index_auto_expand_replicas:
859
859
  :param index_number_of_replicas:
@@ -54,7 +54,7 @@ class XPackClient(NamespacedClient):
54
54
  </ul>
55
55
 
56
56
 
57
- `<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-info>`_
57
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/v9/group/endpoint-xpack>`_
106
+ `<https://www.elastic.co/docs/api/doc/elasticsearch/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
@@ -15,4 +15,4 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- __versionstr__ = "9.0.4"
18
+ __versionstr__ = "9.1.1"
@@ -373,6 +373,12 @@ class Boxplot(Agg[_R]):
373
373
  :arg compression: Limits the maximum number of nodes used by the
374
374
  underlying TDigest algorithm to `20 * compression`, enabling
375
375
  control of memory usage and approximation error.
376
+ :arg execution_hint: The default implementation of TDigest is
377
+ optimized for performance, scaling to millions or even billions of
378
+ sample values while maintaining acceptable accuracy levels (close
379
+ to 1% relative error for millions of samples in some cases). To
380
+ use an implementation optimized for accuracy, set this parameter
381
+ to high_accuracy instead. Defaults to `default` if omitted.
376
382
  :arg field: The field on which to run the aggregation.
377
383
  :arg missing: The value to apply to documents that do not have a
378
384
  value. By default, documents without a value are ignored.
@@ -385,6 +391,9 @@ class Boxplot(Agg[_R]):
385
391
  self,
386
392
  *,
387
393
  compression: Union[float, "DefaultType"] = DEFAULT,
394
+ execution_hint: Union[
395
+ Literal["default", "high_accuracy"], "DefaultType"
396
+ ] = DEFAULT,
388
397
  field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
389
398
  missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT,
390
399
  script: Union["types.Script", Dict[str, Any], "DefaultType"] = DEFAULT,
@@ -392,6 +401,7 @@ class Boxplot(Agg[_R]):
392
401
  ):
393
402
  super().__init__(
394
403
  compression=compression,
404
+ execution_hint=execution_hint,
395
405
  field=field,
396
406
  missing=missing,
397
407
  script=script,
@@ -1900,6 +1910,12 @@ class MedianAbsoluteDeviation(Agg[_R]):
1900
1910
  underlying TDigest algorithm to `20 * compression`, enabling
1901
1911
  control of memory usage and approximation error. Defaults to
1902
1912
  `1000` if omitted.
1913
+ :arg execution_hint: The default implementation of TDigest is
1914
+ optimized for performance, scaling to millions or even billions of
1915
+ sample values while maintaining acceptable accuracy levels (close
1916
+ to 1% relative error for millions of samples in some cases). To
1917
+ use an implementation optimized for accuracy, set this parameter
1918
+ to high_accuracy instead. Defaults to `default` if omitted.
1903
1919
  :arg format:
1904
1920
  :arg field: The field on which to run the aggregation.
1905
1921
  :arg missing: The value to apply to documents that do not have a
@@ -1913,6 +1929,9 @@ class MedianAbsoluteDeviation(Agg[_R]):
1913
1929
  self,
1914
1930
  *,
1915
1931
  compression: Union[float, "DefaultType"] = DEFAULT,
1932
+ execution_hint: Union[
1933
+ Literal["default", "high_accuracy"], "DefaultType"
1934
+ ] = DEFAULT,
1916
1935
  format: Union[str, "DefaultType"] = DEFAULT,
1917
1936
  field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
1918
1937
  missing: Union[str, int, float, bool, "DefaultType"] = DEFAULT,
@@ -1921,6 +1940,7 @@ class MedianAbsoluteDeviation(Agg[_R]):
1921
1940
  ):
1922
1941
  super().__init__(
1923
1942
  compression=compression,
1943
+ execution_hint=execution_hint,
1924
1944
  format=format,
1925
1945
  field=field,
1926
1946
  missing=missing,
@@ -28,7 +28,6 @@ from typing import (
28
28
  List,
29
29
  Optional,
30
30
  Tuple,
31
- Type,
32
31
  TypeVar,
33
32
  Union,
34
33
  get_args,
@@ -333,7 +332,7 @@ class DocumentOptions:
333
332
  # # ignore attributes
334
333
  # field10: ClassVar[string] = "a regular class variable"
335
334
  annotations = attrs.get("__annotations__", {})
336
- fields = set([n for n in attrs if isinstance(attrs[n], Field)])
335
+ fields = {n for n in attrs if isinstance(attrs[n], Field)}
337
336
  fields.update(annotations.keys())
338
337
  field_defaults = {}
339
338
  for name in fields:
@@ -607,7 +606,7 @@ class DocumentBase(ObjectBase):
607
606
 
608
607
  @classmethod
609
608
  def _get_field_names(
610
- cls, for_esql: bool = False, nested_class: Optional[Type[InnerDoc]] = None
609
+ cls, for_esql: bool = False, nested_class: Optional[type[InnerDoc]] = None
611
610
  ) -> List[str]:
612
611
  """Return the list of field names used by this document.
613
612
  If the document has nested objects, their fields are reported using dot
@@ -3862,6 +3862,11 @@ class SemanticText(Field):
3862
3862
  by using the Update mapping API. Use the Create inference API to
3863
3863
  create the endpoint. If not specified, the inference endpoint
3864
3864
  defined by inference_id will be used at both index and query time.
3865
+ :arg chunking_settings: Settings for chunking text into smaller
3866
+ passages. If specified, these will override the chunking settings
3867
+ sent in the inference endpoint associated with inference_id. If
3868
+ chunking settings are updated, they will not be applied to
3869
+ existing documents until they are reindexed.
3865
3870
  """
3866
3871
 
3867
3872
  name = "semantic_text"
@@ -3872,6 +3877,9 @@ class SemanticText(Field):
3872
3877
  meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
3873
3878
  inference_id: Union[str, "DefaultType"] = DEFAULT,
3874
3879
  search_inference_id: Union[str, "DefaultType"] = DEFAULT,
3880
+ chunking_settings: Union[
3881
+ "types.ChunkingSettings", Dict[str, Any], "DefaultType"
3882
+ ] = DEFAULT,
3875
3883
  **kwargs: Any,
3876
3884
  ):
3877
3885
  if meta is not DEFAULT:
@@ -3880,6 +3888,8 @@ class SemanticText(Field):
3880
3888
  kwargs["inference_id"] = inference_id
3881
3889
  if search_inference_id is not DEFAULT:
3882
3890
  kwargs["search_inference_id"] = search_inference_id
3891
+ if chunking_settings is not DEFAULT:
3892
+ kwargs["chunking_settings"] = chunking_settings
3883
3893
  super().__init__(*args, **kwargs)
3884
3894
 
3885
3895
 
@@ -4076,6 +4086,9 @@ class Short(Integer):
4076
4086
  class SparseVector(Field):
4077
4087
  """
4078
4088
  :arg store:
4089
+ :arg index_options: Additional index options for the sparse vector
4090
+ field that controls the token pruning behavior of the sparse
4091
+ vector field.
4079
4092
  :arg meta: Metadata about the field.
4080
4093
  :arg properties:
4081
4094
  :arg ignore_above:
@@ -4094,6 +4107,9 @@ class SparseVector(Field):
4094
4107
  self,
4095
4108
  *args: Any,
4096
4109
  store: Union[bool, "DefaultType"] = DEFAULT,
4110
+ index_options: Union[
4111
+ "types.SparseVectorIndexOptions", Dict[str, Any], "DefaultType"
4112
+ ] = DEFAULT,
4097
4113
  meta: Union[Mapping[str, str], "DefaultType"] = DEFAULT,
4098
4114
  properties: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
4099
4115
  ignore_above: Union[int, "DefaultType"] = DEFAULT,
@@ -4108,6 +4124,8 @@ class SparseVector(Field):
4108
4124
  ):
4109
4125
  if store is not DEFAULT:
4110
4126
  kwargs["store"] = store
4127
+ if index_options is not DEFAULT:
4128
+ kwargs["index_options"] = index_options
4111
4129
  if meta is not DEFAULT:
4112
4130
  kwargs["meta"] = meta
4113
4131
  if properties is not DEFAULT:
@@ -1084,7 +1084,7 @@ class Knn(Query):
1084
1084
  :arg similarity: The minimum similarity for a vector to be considered
1085
1085
  a match
1086
1086
  :arg rescore_vector: Apply oversampling and rescoring to quantized
1087
- vectors *
1087
+ vectors
1088
1088
  :arg boost: Floating point number used to decrease or increase the
1089
1089
  relevance scores of the query. Boost values are relative to the
1090
1090
  default value of 1.0. A boost value between 0 and 1.0 decreases
@@ -363,7 +363,7 @@ class UpdateByQueryResponse(AttrDict[Any], Generic[_R]):
363
363
  deleted: int
364
364
  requests_per_second: float
365
365
  retries: "types.Retries"
366
- task: Union[str, int]
366
+ task: str
367
367
  timed_out: bool
368
368
  took: Any
369
369
  total: int