elasticsearch 9.0.2__py3-none-any.whl → 9.0.4__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 (61) hide show
  1. elasticsearch/_async/client/__init__.py +59 -202
  2. elasticsearch/_async/client/cat.py +1011 -59
  3. elasticsearch/_async/client/cluster.py +14 -4
  4. elasticsearch/_async/client/eql.py +10 -2
  5. elasticsearch/_async/client/esql.py +33 -10
  6. elasticsearch/_async/client/indices.py +88 -44
  7. elasticsearch/_async/client/inference.py +108 -3
  8. elasticsearch/_async/client/ingest.py +0 -7
  9. elasticsearch/_async/client/license.py +4 -4
  10. elasticsearch/_async/client/ml.py +6 -17
  11. elasticsearch/_async/client/monitoring.py +1 -1
  12. elasticsearch/_async/client/rollup.py +1 -22
  13. elasticsearch/_async/client/security.py +11 -17
  14. elasticsearch/_async/client/snapshot.py +6 -0
  15. elasticsearch/_async/client/sql.py +1 -1
  16. elasticsearch/_async/client/synonyms.py +1 -0
  17. elasticsearch/_async/client/transform.py +60 -0
  18. elasticsearch/_async/client/watcher.py +4 -2
  19. elasticsearch/_sync/client/__init__.py +59 -202
  20. elasticsearch/_sync/client/cat.py +1011 -59
  21. elasticsearch/_sync/client/cluster.py +14 -4
  22. elasticsearch/_sync/client/eql.py +10 -2
  23. elasticsearch/_sync/client/esql.py +33 -10
  24. elasticsearch/_sync/client/indices.py +88 -44
  25. elasticsearch/_sync/client/inference.py +108 -3
  26. elasticsearch/_sync/client/ingest.py +0 -7
  27. elasticsearch/_sync/client/license.py +4 -4
  28. elasticsearch/_sync/client/ml.py +6 -17
  29. elasticsearch/_sync/client/monitoring.py +1 -1
  30. elasticsearch/_sync/client/rollup.py +1 -22
  31. elasticsearch/_sync/client/security.py +11 -17
  32. elasticsearch/_sync/client/snapshot.py +6 -0
  33. elasticsearch/_sync/client/sql.py +1 -1
  34. elasticsearch/_sync/client/synonyms.py +1 -0
  35. elasticsearch/_sync/client/transform.py +60 -0
  36. elasticsearch/_sync/client/watcher.py +4 -2
  37. elasticsearch/_version.py +1 -1
  38. elasticsearch/compat.py +5 -0
  39. elasticsearch/dsl/__init__.py +2 -1
  40. elasticsearch/dsl/_async/document.py +84 -0
  41. elasticsearch/dsl/_sync/document.py +84 -0
  42. elasticsearch/dsl/document_base.py +219 -16
  43. elasticsearch/dsl/field.py +245 -57
  44. elasticsearch/dsl/query.py +7 -4
  45. elasticsearch/dsl/response/aggs.py +1 -1
  46. elasticsearch/dsl/types.py +125 -88
  47. elasticsearch/dsl/utils.py +2 -2
  48. elasticsearch/{dsl/_sync/_sync_check → esql}/__init__.py +3 -0
  49. elasticsearch/esql/esql.py +1156 -0
  50. elasticsearch/esql/functions.py +1750 -0
  51. {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.4.dist-info}/METADATA +1 -3
  52. {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.4.dist-info}/RECORD +55 -59
  53. elasticsearch/dsl/_sync/_sync_check/document.py +0 -514
  54. elasticsearch/dsl/_sync/_sync_check/faceted_search.py +0 -50
  55. elasticsearch/dsl/_sync/_sync_check/index.py +0 -597
  56. elasticsearch/dsl/_sync/_sync_check/mapping.py +0 -49
  57. elasticsearch/dsl/_sync/_sync_check/search.py +0 -230
  58. elasticsearch/dsl/_sync/_sync_check/update_by_query.py +0 -45
  59. {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.4.dist-info}/WHEEL +0 -0
  60. {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.4.dist-info}/licenses/LICENSE +0 -0
  61. {elasticsearch-9.0.2.dist-info → elasticsearch-9.0.4.dist-info}/licenses/NOTICE +0 -0
@@ -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
@@ -2034,8 +2034,9 @@ class Regexp(Query):
2034
2034
  class Rule(Query):
2035
2035
  """
2036
2036
  :arg organic: (required)
2037
- :arg ruleset_ids: (required)
2038
2037
  :arg match_criteria: (required)
2038
+ :arg ruleset_ids:
2039
+ :arg ruleset_id:
2039
2040
  :arg boost: Floating point number used to decrease or increase the
2040
2041
  relevance scores of the query. Boost values are relative to the
2041
2042
  default value of 1.0. A boost value between 0 and 1.0 decreases
@@ -2053,16 +2054,18 @@ class Rule(Query):
2053
2054
  self,
2054
2055
  *,
2055
2056
  organic: Union[Query, "DefaultType"] = DEFAULT,
2056
- ruleset_ids: Union[Sequence[str], "DefaultType"] = DEFAULT,
2057
2057
  match_criteria: Any = DEFAULT,
2058
+ ruleset_ids: Union[str, Sequence[str], "DefaultType"] = DEFAULT,
2059
+ ruleset_id: Union[str, "DefaultType"] = DEFAULT,
2058
2060
  boost: Union[float, "DefaultType"] = DEFAULT,
2059
2061
  _name: Union[str, "DefaultType"] = DEFAULT,
2060
2062
  **kwargs: Any,
2061
2063
  ):
2062
2064
  super().__init__(
2063
2065
  organic=organic,
2064
- ruleset_ids=ruleset_ids,
2065
2066
  match_criteria=match_criteria,
2067
+ ruleset_ids=ruleset_ids,
2068
+ ruleset_id=ruleset_id,
2066
2069
  boost=boost,
2067
2070
  _name=_name,
2068
2071
  **kwargs,
@@ -63,7 +63,7 @@ class BucketData(AggResponse[_R]):
63
63
  )
64
64
 
65
65
  def __iter__(self) -> Iterator["Agg"]: # type: ignore[override]
66
- return iter(self.buckets) # type: ignore[arg-type]
66
+ return iter(self.buckets)
67
67
 
68
68
  def __len__(self) -> int:
69
69
  return len(self.buckets)
@@ -142,48 +142,6 @@ class ChiSquareHeuristic(AttrDict[Any]):
142
142
  super().__init__(kwargs)
143
143
 
144
144
 
145
- class ChunkingSettings(AttrDict[Any]):
146
- """
147
- :arg strategy: (required) The chunking strategy: `sentence` or `word`.
148
- Defaults to `sentence` if omitted.
149
- :arg max_chunk_size: (required) The maximum size of a chunk in words.
150
- This value cannot be higher than `300` or lower than `20` (for
151
- `sentence` strategy) or `10` (for `word` strategy). Defaults to
152
- `250` if omitted.
153
- :arg overlap: The number of overlapping words for chunks. It is
154
- applicable only to a `word` chunking strategy. This value cannot
155
- be higher than half the `max_chunk_size` value. Defaults to `100`
156
- if omitted.
157
- :arg sentence_overlap: The number of overlapping sentences for chunks.
158
- It is applicable only for a `sentence` chunking strategy. It can
159
- be either `1` or `0`. Defaults to `1` if omitted.
160
- """
161
-
162
- strategy: Union[str, DefaultType]
163
- max_chunk_size: Union[int, DefaultType]
164
- overlap: Union[int, DefaultType]
165
- sentence_overlap: Union[int, DefaultType]
166
-
167
- def __init__(
168
- self,
169
- *,
170
- strategy: Union[str, DefaultType] = DEFAULT,
171
- max_chunk_size: Union[int, DefaultType] = DEFAULT,
172
- overlap: Union[int, DefaultType] = DEFAULT,
173
- sentence_overlap: Union[int, DefaultType] = DEFAULT,
174
- **kwargs: Any,
175
- ):
176
- if strategy is not DEFAULT:
177
- kwargs["strategy"] = strategy
178
- if max_chunk_size is not DEFAULT:
179
- kwargs["max_chunk_size"] = max_chunk_size
180
- if overlap is not DEFAULT:
181
- kwargs["overlap"] = overlap
182
- if sentence_overlap is not DEFAULT:
183
- kwargs["sentence_overlap"] = sentence_overlap
184
- super().__init__(kwargs)
185
-
186
-
187
145
  class ClassificationInferenceOptions(AttrDict[Any]):
188
146
  """
189
147
  :arg num_top_classes: Specifies the number of top class predictions to
@@ -371,9 +329,6 @@ class DenseVectorIndexOptions(AttrDict[Any]):
371
329
  :arg m: The number of neighbors each node will be connected to in the
372
330
  HNSW graph. Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`,
373
331
  and `int4_hnsw` index types. Defaults to `16` if omitted.
374
- :arg rescore_vector: The rescore vector options. This is only
375
- applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`,
376
- `int4_flat`, and `int8_flat` index types.
377
332
  """
378
333
 
379
334
  type: Union[
@@ -392,9 +347,6 @@ class DenseVectorIndexOptions(AttrDict[Any]):
392
347
  confidence_interval: Union[float, DefaultType]
393
348
  ef_construction: Union[int, DefaultType]
394
349
  m: Union[int, DefaultType]
395
- rescore_vector: Union[
396
- "DenseVectorIndexOptionsRescoreVector", Dict[str, Any], DefaultType
397
- ]
398
350
 
399
351
  def __init__(
400
352
  self,
@@ -415,9 +367,6 @@ class DenseVectorIndexOptions(AttrDict[Any]):
415
367
  confidence_interval: Union[float, DefaultType] = DEFAULT,
416
368
  ef_construction: Union[int, DefaultType] = DEFAULT,
417
369
  m: Union[int, DefaultType] = DEFAULT,
418
- rescore_vector: Union[
419
- "DenseVectorIndexOptionsRescoreVector", Dict[str, Any], DefaultType
420
- ] = DEFAULT,
421
370
  **kwargs: Any,
422
371
  ):
423
372
  if type is not DEFAULT:
@@ -428,29 +377,6 @@ class DenseVectorIndexOptions(AttrDict[Any]):
428
377
  kwargs["ef_construction"] = ef_construction
429
378
  if m is not DEFAULT:
430
379
  kwargs["m"] = m
431
- if rescore_vector is not DEFAULT:
432
- kwargs["rescore_vector"] = rescore_vector
433
- super().__init__(kwargs)
434
-
435
-
436
- class DenseVectorIndexOptionsRescoreVector(AttrDict[Any]):
437
- """
438
- :arg oversample: (required) The oversampling factor to use when
439
- searching for the nearest neighbor. This is only applicable to the
440
- quantized formats: `bbq_*`, `int4_*`, and `int8_*`. When provided,
441
- `oversample * k` vectors will be gathered and then their scores
442
- will be re-computed with the original vectors. valid values are
443
- between `1.0` and `10.0` (inclusive), or `0` exactly to disable
444
- oversampling.
445
- """
446
-
447
- oversample: Union[float, DefaultType]
448
-
449
- def __init__(
450
- self, *, oversample: Union[float, DefaultType] = DEFAULT, **kwargs: Any
451
- ):
452
- if oversample is not DEFAULT:
453
- kwargs["oversample"] = oversample
454
380
  super().__init__(kwargs)
455
381
 
456
382
 
@@ -945,7 +871,7 @@ class GeoDistanceSort(AttrDict[Any]):
945
871
 
946
872
  class GeoGridQuery(AttrDict[Any]):
947
873
  """
948
- :arg geogrid:
874
+ :arg geotile:
949
875
  :arg geohash:
950
876
  :arg geohex:
951
877
  :arg boost: Floating point number used to decrease or increase the
@@ -956,7 +882,7 @@ class GeoGridQuery(AttrDict[Any]):
956
882
  :arg _name:
957
883
  """
958
884
 
959
- geogrid: Union[str, DefaultType]
885
+ geotile: Union[str, DefaultType]
960
886
  geohash: Union[str, DefaultType]
961
887
  geohex: Union[str, DefaultType]
962
888
  boost: Union[float, DefaultType]
@@ -965,15 +891,15 @@ class GeoGridQuery(AttrDict[Any]):
965
891
  def __init__(
966
892
  self,
967
893
  *,
968
- geogrid: Union[str, DefaultType] = DEFAULT,
894
+ geotile: Union[str, DefaultType] = DEFAULT,
969
895
  geohash: Union[str, DefaultType] = DEFAULT,
970
896
  geohex: Union[str, DefaultType] = DEFAULT,
971
897
  boost: Union[float, DefaultType] = DEFAULT,
972
898
  _name: Union[str, DefaultType] = DEFAULT,
973
899
  **kwargs: Any,
974
900
  ):
975
- if geogrid is not DEFAULT:
976
- kwargs["geogrid"] = geogrid
901
+ if geotile is not DEFAULT:
902
+ kwargs["geotile"] = geotile
977
903
  if geohash is not DEFAULT:
978
904
  kwargs["geohash"] = geohash
979
905
  if geohex is not DEFAULT:
@@ -1799,6 +1725,8 @@ class IntervalsContainer(AttrDict[Any]):
1799
1725
  :arg match: Matches analyzed text.
1800
1726
  :arg prefix: Matches terms that start with a specified set of
1801
1727
  characters.
1728
+ :arg range:
1729
+ :arg regexp:
1802
1730
  :arg wildcard: Matches terms using a wildcard pattern.
1803
1731
  """
1804
1732
 
@@ -1807,6 +1735,8 @@ class IntervalsContainer(AttrDict[Any]):
1807
1735
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
1808
1736
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
1809
1737
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
1738
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType]
1739
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
1810
1740
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
1811
1741
 
1812
1742
  def __init__(
@@ -1817,6 +1747,8 @@ class IntervalsContainer(AttrDict[Any]):
1817
1747
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
1818
1748
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
1819
1749
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
1750
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
1751
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
1820
1752
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
1821
1753
  **kwargs: Any,
1822
1754
  ):
@@ -1830,6 +1762,10 @@ class IntervalsContainer(AttrDict[Any]):
1830
1762
  kwargs["match"] = match
1831
1763
  if prefix is not DEFAULT:
1832
1764
  kwargs["prefix"] = prefix
1765
+ if range is not DEFAULT:
1766
+ kwargs["range"] = range
1767
+ if regexp is not DEFAULT:
1768
+ kwargs["regexp"] = regexp
1833
1769
  if wildcard is not DEFAULT:
1834
1770
  kwargs["wildcard"] = wildcard
1835
1771
  super().__init__(kwargs)
@@ -2050,6 +1986,8 @@ class IntervalsQuery(AttrDict[Any]):
2050
1986
  :arg match: Matches analyzed text.
2051
1987
  :arg prefix: Matches terms that start with a specified set of
2052
1988
  characters.
1989
+ :arg range:
1990
+ :arg regexp:
2053
1991
  :arg wildcard: Matches terms using a wildcard pattern.
2054
1992
  :arg boost: Floating point number used to decrease or increase the
2055
1993
  relevance scores of the query. Boost values are relative to the
@@ -2064,6 +2002,8 @@ class IntervalsQuery(AttrDict[Any]):
2064
2002
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
2065
2003
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
2066
2004
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
2005
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType]
2006
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
2067
2007
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
2068
2008
  boost: Union[float, DefaultType]
2069
2009
  _name: Union[str, DefaultType]
@@ -2076,6 +2016,8 @@ class IntervalsQuery(AttrDict[Any]):
2076
2016
  fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
2077
2017
  match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
2078
2018
  prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
2019
+ range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
2020
+ regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
2079
2021
  wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
2080
2022
  boost: Union[float, DefaultType] = DEFAULT,
2081
2023
  _name: Union[str, DefaultType] = DEFAULT,
@@ -2091,6 +2033,10 @@ class IntervalsQuery(AttrDict[Any]):
2091
2033
  kwargs["match"] = match
2092
2034
  if prefix is not DEFAULT:
2093
2035
  kwargs["prefix"] = prefix
2036
+ if range is not DEFAULT:
2037
+ kwargs["range"] = range
2038
+ if regexp is not DEFAULT:
2039
+ kwargs["regexp"] = regexp
2094
2040
  if wildcard is not DEFAULT:
2095
2041
  kwargs["wildcard"] = wildcard
2096
2042
  if boost is not DEFAULT:
@@ -2100,6 +2046,83 @@ class IntervalsQuery(AttrDict[Any]):
2100
2046
  super().__init__(kwargs)
2101
2047
 
2102
2048
 
2049
+ class IntervalsRange(AttrDict[Any]):
2050
+ """
2051
+ :arg analyzer: Analyzer used to analyze the `prefix`.
2052
+ :arg gte: Lower term, either gte or gt must be provided.
2053
+ :arg gt: Lower term, either gte or gt must be provided.
2054
+ :arg lte: Upper term, either lte or lt must be provided.
2055
+ :arg lt: Upper term, either lte or lt must be provided.
2056
+ :arg use_field: If specified, match intervals from this field rather
2057
+ than the top-level field. The `prefix` is normalized using the
2058
+ search analyzer from this field, unless `analyzer` is specified
2059
+ separately.
2060
+ """
2061
+
2062
+ analyzer: Union[str, DefaultType]
2063
+ gte: Union[str, DefaultType]
2064
+ gt: Union[str, DefaultType]
2065
+ lte: Union[str, DefaultType]
2066
+ lt: Union[str, DefaultType]
2067
+ use_field: Union[str, InstrumentedField, DefaultType]
2068
+
2069
+ def __init__(
2070
+ self,
2071
+ *,
2072
+ analyzer: Union[str, DefaultType] = DEFAULT,
2073
+ gte: Union[str, DefaultType] = DEFAULT,
2074
+ gt: Union[str, DefaultType] = DEFAULT,
2075
+ lte: Union[str, DefaultType] = DEFAULT,
2076
+ lt: Union[str, DefaultType] = DEFAULT,
2077
+ use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
2078
+ **kwargs: Any,
2079
+ ):
2080
+ if analyzer is not DEFAULT:
2081
+ kwargs["analyzer"] = analyzer
2082
+ if gte is not DEFAULT:
2083
+ kwargs["gte"] = gte
2084
+ if gt is not DEFAULT:
2085
+ kwargs["gt"] = gt
2086
+ if lte is not DEFAULT:
2087
+ kwargs["lte"] = lte
2088
+ if lt is not DEFAULT:
2089
+ kwargs["lt"] = lt
2090
+ if use_field is not DEFAULT:
2091
+ kwargs["use_field"] = str(use_field)
2092
+ super().__init__(kwargs)
2093
+
2094
+
2095
+ class IntervalsRegexp(AttrDict[Any]):
2096
+ """
2097
+ :arg pattern: (required) Regex pattern.
2098
+ :arg analyzer: Analyzer used to analyze the `prefix`.
2099
+ :arg use_field: If specified, match intervals from this field rather
2100
+ than the top-level field. The `prefix` is normalized using the
2101
+ search analyzer from this field, unless `analyzer` is specified
2102
+ separately.
2103
+ """
2104
+
2105
+ pattern: Union[str, DefaultType]
2106
+ analyzer: Union[str, DefaultType]
2107
+ use_field: Union[str, InstrumentedField, DefaultType]
2108
+
2109
+ def __init__(
2110
+ self,
2111
+ *,
2112
+ pattern: Union[str, DefaultType] = DEFAULT,
2113
+ analyzer: Union[str, DefaultType] = DEFAULT,
2114
+ use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
2115
+ **kwargs: Any,
2116
+ ):
2117
+ if pattern is not DEFAULT:
2118
+ kwargs["pattern"] = pattern
2119
+ if analyzer is not DEFAULT:
2120
+ kwargs["analyzer"] = analyzer
2121
+ if use_field is not DEFAULT:
2122
+ kwargs["use_field"] = str(use_field)
2123
+ super().__init__(kwargs)
2124
+
2125
+
2103
2126
  class IntervalsWildcard(AttrDict[Any]):
2104
2127
  """
2105
2128
  :arg pattern: (required) Wildcard pattern used to find matching terms.
@@ -4367,7 +4390,7 @@ class ArrayPercentilesItem(AttrDict[Any]):
4367
4390
  :arg value_as_string:
4368
4391
  """
4369
4392
 
4370
- key: str
4393
+ key: float
4371
4394
  value: Union[float, None]
4372
4395
  value_as_string: str
4373
4396
 
@@ -4806,7 +4829,7 @@ class ErrorCause(AttrDict[Any]):
4806
4829
  """
4807
4830
 
4808
4831
  type: str
4809
- reason: str
4832
+ reason: Union[str, None]
4810
4833
  stack_trace: str
4811
4834
  caused_by: "ErrorCause"
4812
4835
  root_cause: Sequence["ErrorCause"]
@@ -5022,9 +5045,11 @@ class FiltersAggregate(AttrDict[Any]):
5022
5045
  class FiltersBucket(AttrDict[Any]):
5023
5046
  """
5024
5047
  :arg doc_count: (required)
5048
+ :arg key:
5025
5049
  """
5026
5050
 
5027
5051
  doc_count: int
5052
+ key: str
5028
5053
 
5029
5054
 
5030
5055
  class FrequentItemSetsAggregate(AttrDict[Any]):
@@ -5211,7 +5236,9 @@ class HdrPercentileRanksAggregate(AttrDict[Any]):
5211
5236
  :arg meta:
5212
5237
  """
5213
5238
 
5214
- values: Union[Mapping[str, Union[str, int, None]], Sequence["ArrayPercentilesItem"]]
5239
+ values: Union[
5240
+ Mapping[str, Union[str, float, None]], Sequence["ArrayPercentilesItem"]
5241
+ ]
5215
5242
  meta: Mapping[str, Any]
5216
5243
 
5217
5244
 
@@ -5221,7 +5248,9 @@ class HdrPercentilesAggregate(AttrDict[Any]):
5221
5248
  :arg meta:
5222
5249
  """
5223
5250
 
5224
- values: Union[Mapping[str, Union[str, int, None]], Sequence["ArrayPercentilesItem"]]
5251
+ values: Union[
5252
+ Mapping[str, Union[str, float, None]], Sequence["ArrayPercentilesItem"]
5253
+ ]
5225
5254
  meta: Mapping[str, Any]
5226
5255
 
5227
5256
 
@@ -5728,7 +5757,9 @@ class PercentilesBucketAggregate(AttrDict[Any]):
5728
5757
  :arg meta:
5729
5758
  """
5730
5759
 
5731
- values: Union[Mapping[str, Union[str, int, None]], Sequence["ArrayPercentilesItem"]]
5760
+ values: Union[
5761
+ Mapping[str, Union[str, float, None]], Sequence["ArrayPercentilesItem"]
5762
+ ]
5732
5763
  meta: Mapping[str, Any]
5733
5764
 
5734
5765
 
@@ -5929,17 +5960,19 @@ class SearchProfile(AttrDict[Any]):
5929
5960
  class ShardFailure(AttrDict[Any]):
5930
5961
  """
5931
5962
  :arg reason: (required)
5932
- :arg shard: (required)
5933
5963
  :arg index:
5934
5964
  :arg node:
5965
+ :arg shard:
5935
5966
  :arg status:
5967
+ :arg primary:
5936
5968
  """
5937
5969
 
5938
5970
  reason: "ErrorCause"
5939
- shard: int
5940
5971
  index: str
5941
5972
  node: str
5973
+ shard: int
5942
5974
  status: str
5975
+ primary: bool
5943
5976
 
5944
5977
 
5945
5978
  class ShardProfile(AttrDict[Any]):
@@ -6263,7 +6296,9 @@ class TDigestPercentileRanksAggregate(AttrDict[Any]):
6263
6296
  :arg meta:
6264
6297
  """
6265
6298
 
6266
- values: Union[Mapping[str, Union[str, int, None]], Sequence["ArrayPercentilesItem"]]
6299
+ values: Union[
6300
+ Mapping[str, Union[str, float, None]], Sequence["ArrayPercentilesItem"]
6301
+ ]
6267
6302
  meta: Mapping[str, Any]
6268
6303
 
6269
6304
 
@@ -6273,7 +6308,9 @@ class TDigestPercentilesAggregate(AttrDict[Any]):
6273
6308
  :arg meta:
6274
6309
  """
6275
6310
 
6276
- values: Union[Mapping[str, Union[str, int, None]], Sequence["ArrayPercentilesItem"]]
6311
+ values: Union[
6312
+ Mapping[str, Union[str, float, None]], Sequence["ArrayPercentilesItem"]
6313
+ ]
6277
6314
  meta: Mapping[str, Any]
6278
6315
 
6279
6316
 
@@ -333,7 +333,7 @@ class DslBase(metaclass=DslMeta):
333
333
  _expand__to_dot = EXPAND__TO_DOT
334
334
  self._params: Dict[str, Any] = {}
335
335
  for pname, pvalue in params.items():
336
- if pvalue == DEFAULT:
336
+ if pvalue is DEFAULT:
337
337
  continue
338
338
  # expand "__" to dots
339
339
  if "__" in pname and _expand__to_dot:
@@ -603,7 +603,7 @@ class ObjectBase(AttrDict[Any]):
603
603
  # if this is a mapped field,
604
604
  f = self.__get_field(k)
605
605
  if f and f._coerce:
606
- v = f.serialize(v)
606
+ v = f.serialize(v, skip_empty=skip_empty)
607
607
 
608
608
  # if someone assigned AttrList, unwrap it
609
609
  if isinstance(v, AttrList):
@@ -14,3 +14,6 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
+
18
+ from ..dsl import E # noqa: F401
19
+ from .esql import ESQL, ESQLBase, and_, not_, or_ # noqa: F401