elasticsearch 9.0.2__py3-none-any.whl → 9.1.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.
- elasticsearch/__init__.py +3 -3
- elasticsearch/_async/client/__init__.py +88 -244
- elasticsearch/_async/client/async_search.py +4 -4
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +419 -51
- elasticsearch/_async/client/ccr.py +13 -13
- elasticsearch/_async/client/cluster.py +32 -22
- elasticsearch/_async/client/connector.py +30 -30
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +5 -5
- elasticsearch/_async/client/eql.py +14 -6
- elasticsearch/_async/client/esql.py +125 -9
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +3 -3
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +11 -11
- elasticsearch/_async/client/indices.py +592 -113
- elasticsearch/_async/client/inference.py +521 -44
- elasticsearch/_async/client/ingest.py +9 -16
- elasticsearch/_async/client/license.py +11 -11
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +75 -87
- elasticsearch/_async/client/monitoring.py +1 -1
- elasticsearch/_async/client/nodes.py +7 -7
- elasticsearch/_async/client/query_rules.py +8 -8
- elasticsearch/_async/client/rollup.py +9 -30
- elasticsearch/_async/client/search_application.py +10 -10
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +79 -81
- elasticsearch/_async/client/shutdown.py +3 -3
- elasticsearch/_async/client/simulate.py +1 -1
- elasticsearch/_async/client/slm.py +9 -9
- elasticsearch/_async/client/snapshot.py +64 -21
- elasticsearch/_async/client/sql.py +6 -6
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +26 -7
- elasticsearch/_async/client/tasks.py +4 -4
- elasticsearch/_async/client/text_structure.py +4 -4
- elasticsearch/_async/client/transform.py +11 -11
- elasticsearch/_async/client/watcher.py +17 -15
- elasticsearch/_async/client/xpack.py +2 -2
- elasticsearch/_otel.py +8 -8
- elasticsearch/_sync/client/__init__.py +88 -244
- elasticsearch/_sync/client/async_search.py +4 -4
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +419 -51
- elasticsearch/_sync/client/ccr.py +13 -13
- elasticsearch/_sync/client/cluster.py +32 -22
- elasticsearch/_sync/client/connector.py +30 -30
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +5 -5
- elasticsearch/_sync/client/eql.py +14 -6
- elasticsearch/_sync/client/esql.py +125 -9
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +3 -3
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +11 -11
- elasticsearch/_sync/client/indices.py +592 -113
- elasticsearch/_sync/client/inference.py +521 -44
- elasticsearch/_sync/client/ingest.py +9 -16
- elasticsearch/_sync/client/license.py +11 -11
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +75 -87
- elasticsearch/_sync/client/monitoring.py +1 -1
- elasticsearch/_sync/client/nodes.py +7 -7
- elasticsearch/_sync/client/query_rules.py +8 -8
- elasticsearch/_sync/client/rollup.py +9 -30
- elasticsearch/_sync/client/search_application.py +10 -10
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +79 -81
- elasticsearch/_sync/client/shutdown.py +3 -3
- elasticsearch/_sync/client/simulate.py +1 -1
- elasticsearch/_sync/client/slm.py +9 -9
- elasticsearch/_sync/client/snapshot.py +64 -21
- elasticsearch/_sync/client/sql.py +6 -6
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +26 -7
- elasticsearch/_sync/client/tasks.py +4 -4
- elasticsearch/_sync/client/text_structure.py +4 -4
- elasticsearch/_sync/client/transform.py +11 -11
- elasticsearch/_sync/client/watcher.py +17 -15
- elasticsearch/_sync/client/xpack.py +2 -2
- elasticsearch/_version.py +1 -1
- elasticsearch/compat.py +5 -0
- elasticsearch/dsl/__init__.py +2 -1
- elasticsearch/dsl/aggs.py +20 -0
- elasticsearch/dsl/document_base.py +177 -17
- elasticsearch/dsl/field.py +230 -37
- elasticsearch/dsl/query.py +6 -3
- elasticsearch/dsl/response/__init__.py +1 -1
- elasticsearch/dsl/types.py +169 -11
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/{dsl/_sync/_sync_check → esql}/__init__.py +2 -0
- elasticsearch/esql/esql.py +1105 -0
- elasticsearch/esql/esql1.py1 +307 -0
- elasticsearch/esql/functions.py +1738 -0
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.1.0.dist-info}/METADATA +3 -4
- elasticsearch-9.1.0.dist-info/RECORD +164 -0
- elasticsearch/dsl/_sync/_sync_check/document.py +0 -514
- elasticsearch/dsl/_sync/_sync_check/faceted_search.py +0 -50
- elasticsearch/dsl/_sync/_sync_check/index.py +0 -597
- elasticsearch/dsl/_sync/_sync_check/mapping.py +0 -49
- elasticsearch/dsl/_sync/_sync_check/search.py +0 -230
- elasticsearch/dsl/_sync/_sync_check/update_by_query.py +0 -45
- elasticsearch-9.0.2.dist-info/RECORD +0 -167
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.1.0.dist-info}/WHEEL +0 -0
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.1.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.0.2.dist-info → elasticsearch-9.1.0.dist-info}/licenses/NOTICE +0 -0
elasticsearch/dsl/types.py
CHANGED
|
@@ -945,7 +945,7 @@ class GeoDistanceSort(AttrDict[Any]):
|
|
|
945
945
|
|
|
946
946
|
class GeoGridQuery(AttrDict[Any]):
|
|
947
947
|
"""
|
|
948
|
-
:arg
|
|
948
|
+
:arg geotile:
|
|
949
949
|
:arg geohash:
|
|
950
950
|
:arg geohex:
|
|
951
951
|
:arg boost: Floating point number used to decrease or increase the
|
|
@@ -956,7 +956,7 @@ class GeoGridQuery(AttrDict[Any]):
|
|
|
956
956
|
:arg _name:
|
|
957
957
|
"""
|
|
958
958
|
|
|
959
|
-
|
|
959
|
+
geotile: Union[str, DefaultType]
|
|
960
960
|
geohash: Union[str, DefaultType]
|
|
961
961
|
geohex: Union[str, DefaultType]
|
|
962
962
|
boost: Union[float, DefaultType]
|
|
@@ -965,15 +965,15 @@ class GeoGridQuery(AttrDict[Any]):
|
|
|
965
965
|
def __init__(
|
|
966
966
|
self,
|
|
967
967
|
*,
|
|
968
|
-
|
|
968
|
+
geotile: Union[str, DefaultType] = DEFAULT,
|
|
969
969
|
geohash: Union[str, DefaultType] = DEFAULT,
|
|
970
970
|
geohex: Union[str, DefaultType] = DEFAULT,
|
|
971
971
|
boost: Union[float, DefaultType] = DEFAULT,
|
|
972
972
|
_name: Union[str, DefaultType] = DEFAULT,
|
|
973
973
|
**kwargs: Any,
|
|
974
974
|
):
|
|
975
|
-
if
|
|
976
|
-
kwargs["
|
|
975
|
+
if geotile is not DEFAULT:
|
|
976
|
+
kwargs["geotile"] = geotile
|
|
977
977
|
if geohash is not DEFAULT:
|
|
978
978
|
kwargs["geohash"] = geohash
|
|
979
979
|
if geohex is not DEFAULT:
|
|
@@ -1211,6 +1211,7 @@ class Highlight(AttrDict[Any]):
|
|
|
1211
1211
|
|
|
1212
1212
|
fields: Union[
|
|
1213
1213
|
Mapping[Union[str, InstrumentedField], "HighlightField"],
|
|
1214
|
+
Sequence[Mapping[Union[str, InstrumentedField], "HighlightField"]],
|
|
1214
1215
|
Dict[str, Any],
|
|
1215
1216
|
DefaultType,
|
|
1216
1217
|
]
|
|
@@ -1242,6 +1243,7 @@ class Highlight(AttrDict[Any]):
|
|
|
1242
1243
|
*,
|
|
1243
1244
|
fields: Union[
|
|
1244
1245
|
Mapping[Union[str, InstrumentedField], "HighlightField"],
|
|
1246
|
+
Sequence[Mapping[Union[str, InstrumentedField], "HighlightField"]],
|
|
1245
1247
|
Dict[str, Any],
|
|
1246
1248
|
DefaultType,
|
|
1247
1249
|
] = DEFAULT,
|
|
@@ -1799,6 +1801,8 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1799
1801
|
:arg match: Matches analyzed text.
|
|
1800
1802
|
:arg prefix: Matches terms that start with a specified set of
|
|
1801
1803
|
characters.
|
|
1804
|
+
:arg range:
|
|
1805
|
+
:arg regexp:
|
|
1802
1806
|
:arg wildcard: Matches terms using a wildcard pattern.
|
|
1803
1807
|
"""
|
|
1804
1808
|
|
|
@@ -1807,6 +1811,8 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1807
1811
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
|
|
1808
1812
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
|
|
1809
1813
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
|
|
1814
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType]
|
|
1815
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
|
|
1810
1816
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
|
|
1811
1817
|
|
|
1812
1818
|
def __init__(
|
|
@@ -1817,6 +1823,8 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1817
1823
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1818
1824
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1819
1825
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1826
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1827
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1820
1828
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1821
1829
|
**kwargs: Any,
|
|
1822
1830
|
):
|
|
@@ -1830,6 +1838,10 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1830
1838
|
kwargs["match"] = match
|
|
1831
1839
|
if prefix is not DEFAULT:
|
|
1832
1840
|
kwargs["prefix"] = prefix
|
|
1841
|
+
if range is not DEFAULT:
|
|
1842
|
+
kwargs["range"] = range
|
|
1843
|
+
if regexp is not DEFAULT:
|
|
1844
|
+
kwargs["regexp"] = regexp
|
|
1833
1845
|
if wildcard is not DEFAULT:
|
|
1834
1846
|
kwargs["wildcard"] = wildcard
|
|
1835
1847
|
super().__init__(kwargs)
|
|
@@ -2050,6 +2062,8 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2050
2062
|
:arg match: Matches analyzed text.
|
|
2051
2063
|
:arg prefix: Matches terms that start with a specified set of
|
|
2052
2064
|
characters.
|
|
2065
|
+
:arg range:
|
|
2066
|
+
:arg regexp:
|
|
2053
2067
|
:arg wildcard: Matches terms using a wildcard pattern.
|
|
2054
2068
|
:arg boost: Floating point number used to decrease or increase the
|
|
2055
2069
|
relevance scores of the query. Boost values are relative to the
|
|
@@ -2064,6 +2078,8 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2064
2078
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
|
|
2065
2079
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
|
|
2066
2080
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
|
|
2081
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType]
|
|
2082
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
|
|
2067
2083
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
|
|
2068
2084
|
boost: Union[float, DefaultType]
|
|
2069
2085
|
_name: Union[str, DefaultType]
|
|
@@ -2076,6 +2092,8 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2076
2092
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2077
2093
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2078
2094
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2095
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2096
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2079
2097
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2080
2098
|
boost: Union[float, DefaultType] = DEFAULT,
|
|
2081
2099
|
_name: Union[str, DefaultType] = DEFAULT,
|
|
@@ -2091,6 +2109,10 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2091
2109
|
kwargs["match"] = match
|
|
2092
2110
|
if prefix is not DEFAULT:
|
|
2093
2111
|
kwargs["prefix"] = prefix
|
|
2112
|
+
if range is not DEFAULT:
|
|
2113
|
+
kwargs["range"] = range
|
|
2114
|
+
if regexp is not DEFAULT:
|
|
2115
|
+
kwargs["regexp"] = regexp
|
|
2094
2116
|
if wildcard is not DEFAULT:
|
|
2095
2117
|
kwargs["wildcard"] = wildcard
|
|
2096
2118
|
if boost is not DEFAULT:
|
|
@@ -2100,6 +2122,83 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2100
2122
|
super().__init__(kwargs)
|
|
2101
2123
|
|
|
2102
2124
|
|
|
2125
|
+
class IntervalsRange(AttrDict[Any]):
|
|
2126
|
+
"""
|
|
2127
|
+
:arg analyzer: Analyzer used to analyze the `prefix`.
|
|
2128
|
+
:arg gte: Lower term, either gte or gt must be provided.
|
|
2129
|
+
:arg gt: Lower term, either gte or gt must be provided.
|
|
2130
|
+
:arg lte: Upper term, either lte or lt must be provided.
|
|
2131
|
+
:arg lt: Upper term, either lte or lt must be provided.
|
|
2132
|
+
:arg use_field: If specified, match intervals from this field rather
|
|
2133
|
+
than the top-level field. The `prefix` is normalized using the
|
|
2134
|
+
search analyzer from this field, unless `analyzer` is specified
|
|
2135
|
+
separately.
|
|
2136
|
+
"""
|
|
2137
|
+
|
|
2138
|
+
analyzer: Union[str, DefaultType]
|
|
2139
|
+
gte: Union[str, DefaultType]
|
|
2140
|
+
gt: Union[str, DefaultType]
|
|
2141
|
+
lte: Union[str, DefaultType]
|
|
2142
|
+
lt: Union[str, DefaultType]
|
|
2143
|
+
use_field: Union[str, InstrumentedField, DefaultType]
|
|
2144
|
+
|
|
2145
|
+
def __init__(
|
|
2146
|
+
self,
|
|
2147
|
+
*,
|
|
2148
|
+
analyzer: Union[str, DefaultType] = DEFAULT,
|
|
2149
|
+
gte: Union[str, DefaultType] = DEFAULT,
|
|
2150
|
+
gt: Union[str, DefaultType] = DEFAULT,
|
|
2151
|
+
lte: Union[str, DefaultType] = DEFAULT,
|
|
2152
|
+
lt: Union[str, DefaultType] = DEFAULT,
|
|
2153
|
+
use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
|
|
2154
|
+
**kwargs: Any,
|
|
2155
|
+
):
|
|
2156
|
+
if analyzer is not DEFAULT:
|
|
2157
|
+
kwargs["analyzer"] = analyzer
|
|
2158
|
+
if gte is not DEFAULT:
|
|
2159
|
+
kwargs["gte"] = gte
|
|
2160
|
+
if gt is not DEFAULT:
|
|
2161
|
+
kwargs["gt"] = gt
|
|
2162
|
+
if lte is not DEFAULT:
|
|
2163
|
+
kwargs["lte"] = lte
|
|
2164
|
+
if lt is not DEFAULT:
|
|
2165
|
+
kwargs["lt"] = lt
|
|
2166
|
+
if use_field is not DEFAULT:
|
|
2167
|
+
kwargs["use_field"] = str(use_field)
|
|
2168
|
+
super().__init__(kwargs)
|
|
2169
|
+
|
|
2170
|
+
|
|
2171
|
+
class IntervalsRegexp(AttrDict[Any]):
|
|
2172
|
+
"""
|
|
2173
|
+
:arg pattern: (required) Regex pattern.
|
|
2174
|
+
:arg analyzer: Analyzer used to analyze the `prefix`.
|
|
2175
|
+
:arg use_field: If specified, match intervals from this field rather
|
|
2176
|
+
than the top-level field. The `prefix` is normalized using the
|
|
2177
|
+
search analyzer from this field, unless `analyzer` is specified
|
|
2178
|
+
separately.
|
|
2179
|
+
"""
|
|
2180
|
+
|
|
2181
|
+
pattern: Union[str, DefaultType]
|
|
2182
|
+
analyzer: Union[str, DefaultType]
|
|
2183
|
+
use_field: Union[str, InstrumentedField, DefaultType]
|
|
2184
|
+
|
|
2185
|
+
def __init__(
|
|
2186
|
+
self,
|
|
2187
|
+
*,
|
|
2188
|
+
pattern: Union[str, DefaultType] = DEFAULT,
|
|
2189
|
+
analyzer: Union[str, DefaultType] = DEFAULT,
|
|
2190
|
+
use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
|
|
2191
|
+
**kwargs: Any,
|
|
2192
|
+
):
|
|
2193
|
+
if pattern is not DEFAULT:
|
|
2194
|
+
kwargs["pattern"] = pattern
|
|
2195
|
+
if analyzer is not DEFAULT:
|
|
2196
|
+
kwargs["analyzer"] = analyzer
|
|
2197
|
+
if use_field is not DEFAULT:
|
|
2198
|
+
kwargs["use_field"] = str(use_field)
|
|
2199
|
+
super().__init__(kwargs)
|
|
2200
|
+
|
|
2201
|
+
|
|
2103
2202
|
class IntervalsWildcard(AttrDict[Any]):
|
|
2104
2203
|
"""
|
|
2105
2204
|
:arg pattern: (required) Wildcard pattern used to find matching terms.
|
|
@@ -3117,10 +3216,15 @@ class SortOptions(AttrDict[Any]):
|
|
|
3117
3216
|
|
|
3118
3217
|
class SourceFilter(AttrDict[Any]):
|
|
3119
3218
|
"""
|
|
3120
|
-
:arg
|
|
3121
|
-
|
|
3219
|
+
:arg exclude_vectors: If `true`, vector fields are excluded from the
|
|
3220
|
+
returned source. This option takes precedence over `includes`:
|
|
3221
|
+
any vector field will remain excluded even if it matches an
|
|
3222
|
+
`includes` rule.
|
|
3223
|
+
:arg excludes: A list of fields to exclude from the returned source.
|
|
3224
|
+
:arg includes: A list of fields to include in the returned source.
|
|
3122
3225
|
"""
|
|
3123
3226
|
|
|
3227
|
+
exclude_vectors: Union[bool, DefaultType]
|
|
3124
3228
|
excludes: Union[
|
|
3125
3229
|
Union[str, InstrumentedField],
|
|
3126
3230
|
Sequence[Union[str, InstrumentedField]],
|
|
@@ -3135,6 +3239,7 @@ class SourceFilter(AttrDict[Any]):
|
|
|
3135
3239
|
def __init__(
|
|
3136
3240
|
self,
|
|
3137
3241
|
*,
|
|
3242
|
+
exclude_vectors: Union[bool, DefaultType] = DEFAULT,
|
|
3138
3243
|
excludes: Union[
|
|
3139
3244
|
Union[str, InstrumentedField],
|
|
3140
3245
|
Sequence[Union[str, InstrumentedField]],
|
|
@@ -3147,6 +3252,8 @@ class SourceFilter(AttrDict[Any]):
|
|
|
3147
3252
|
] = DEFAULT,
|
|
3148
3253
|
**kwargs: Any,
|
|
3149
3254
|
):
|
|
3255
|
+
if exclude_vectors is not DEFAULT:
|
|
3256
|
+
kwargs["exclude_vectors"] = exclude_vectors
|
|
3150
3257
|
if excludes is not DEFAULT:
|
|
3151
3258
|
kwargs["excludes"] = str(excludes)
|
|
3152
3259
|
if includes is not DEFAULT:
|
|
@@ -3596,6 +3703,38 @@ class SpanWithinQuery(AttrDict[Any]):
|
|
|
3596
3703
|
super().__init__(kwargs)
|
|
3597
3704
|
|
|
3598
3705
|
|
|
3706
|
+
class SparseVectorIndexOptions(AttrDict[Any]):
|
|
3707
|
+
"""
|
|
3708
|
+
:arg prune: Whether to perform pruning, omitting the non-significant
|
|
3709
|
+
tokens from the query to improve query performance. If prune is
|
|
3710
|
+
true but the pruning_config is not specified, pruning will occur
|
|
3711
|
+
but default values will be used. Default: false
|
|
3712
|
+
:arg pruning_config: Optional pruning configuration. If enabled, this
|
|
3713
|
+
will omit non-significant tokens from the query in order to
|
|
3714
|
+
improve query performance. This is only used if prune is set to
|
|
3715
|
+
true. If prune is set to true but pruning_config is not specified,
|
|
3716
|
+
default values will be used.
|
|
3717
|
+
"""
|
|
3718
|
+
|
|
3719
|
+
prune: Union[bool, DefaultType]
|
|
3720
|
+
pruning_config: Union["TokenPruningConfig", Dict[str, Any], DefaultType]
|
|
3721
|
+
|
|
3722
|
+
def __init__(
|
|
3723
|
+
self,
|
|
3724
|
+
*,
|
|
3725
|
+
prune: Union[bool, DefaultType] = DEFAULT,
|
|
3726
|
+
pruning_config: Union[
|
|
3727
|
+
"TokenPruningConfig", Dict[str, Any], DefaultType
|
|
3728
|
+
] = DEFAULT,
|
|
3729
|
+
**kwargs: Any,
|
|
3730
|
+
):
|
|
3731
|
+
if prune is not DEFAULT:
|
|
3732
|
+
kwargs["prune"] = prune
|
|
3733
|
+
if pruning_config is not DEFAULT:
|
|
3734
|
+
kwargs["pruning_config"] = pruning_config
|
|
3735
|
+
super().__init__(kwargs)
|
|
3736
|
+
|
|
3737
|
+
|
|
3599
3738
|
class SuggestContext(AttrDict[Any]):
|
|
3600
3739
|
"""
|
|
3601
3740
|
:arg name: (required)
|
|
@@ -3634,15 +3773,30 @@ class TDigest(AttrDict[Any]):
|
|
|
3634
3773
|
:arg compression: Limits the maximum number of nodes used by the
|
|
3635
3774
|
underlying TDigest algorithm to `20 * compression`, enabling
|
|
3636
3775
|
control of memory usage and approximation error.
|
|
3776
|
+
:arg execution_hint: The default implementation of TDigest is
|
|
3777
|
+
optimized for performance, scaling to millions or even billions of
|
|
3778
|
+
sample values while maintaining acceptable accuracy levels (close
|
|
3779
|
+
to 1% relative error for millions of samples in some cases). To
|
|
3780
|
+
use an implementation optimized for accuracy, set this parameter
|
|
3781
|
+
to high_accuracy instead. Defaults to `default` if omitted.
|
|
3637
3782
|
"""
|
|
3638
3783
|
|
|
3639
3784
|
compression: Union[int, DefaultType]
|
|
3785
|
+
execution_hint: Union[Literal["default", "high_accuracy"], DefaultType]
|
|
3640
3786
|
|
|
3641
3787
|
def __init__(
|
|
3642
|
-
self,
|
|
3788
|
+
self,
|
|
3789
|
+
*,
|
|
3790
|
+
compression: Union[int, DefaultType] = DEFAULT,
|
|
3791
|
+
execution_hint: Union[
|
|
3792
|
+
Literal["default", "high_accuracy"], DefaultType
|
|
3793
|
+
] = DEFAULT,
|
|
3794
|
+
**kwargs: Any,
|
|
3643
3795
|
):
|
|
3644
3796
|
if compression is not DEFAULT:
|
|
3645
3797
|
kwargs["compression"] = compression
|
|
3798
|
+
if execution_hint is not DEFAULT:
|
|
3799
|
+
kwargs["execution_hint"] = execution_hint
|
|
3646
3800
|
super().__init__(kwargs)
|
|
3647
3801
|
|
|
3648
3802
|
|
|
@@ -4112,7 +4266,7 @@ class WeightedTokensQuery(AttrDict[Any]):
|
|
|
4112
4266
|
:arg _name:
|
|
4113
4267
|
"""
|
|
4114
4268
|
|
|
4115
|
-
tokens: Union[Mapping[str, float], DefaultType]
|
|
4269
|
+
tokens: Union[Mapping[str, float], Sequence[Mapping[str, float]], DefaultType]
|
|
4116
4270
|
pruning_config: Union["TokenPruningConfig", Dict[str, Any], DefaultType]
|
|
4117
4271
|
boost: Union[float, DefaultType]
|
|
4118
4272
|
_name: Union[str, DefaultType]
|
|
@@ -4120,7 +4274,9 @@ class WeightedTokensQuery(AttrDict[Any]):
|
|
|
4120
4274
|
def __init__(
|
|
4121
4275
|
self,
|
|
4122
4276
|
*,
|
|
4123
|
-
tokens: Union[
|
|
4277
|
+
tokens: Union[
|
|
4278
|
+
Mapping[str, float], Sequence[Mapping[str, float]], DefaultType
|
|
4279
|
+
] = DEFAULT,
|
|
4124
4280
|
pruning_config: Union[
|
|
4125
4281
|
"TokenPruningConfig", Dict[str, Any], DefaultType
|
|
4126
4282
|
] = DEFAULT,
|
|
@@ -4806,7 +4962,7 @@ class ErrorCause(AttrDict[Any]):
|
|
|
4806
4962
|
"""
|
|
4807
4963
|
|
|
4808
4964
|
type: str
|
|
4809
|
-
reason: str
|
|
4965
|
+
reason: Union[str, None]
|
|
4810
4966
|
stack_trace: str
|
|
4811
4967
|
caused_by: "ErrorCause"
|
|
4812
4968
|
root_cause: Sequence["ErrorCause"]
|
|
@@ -5022,9 +5178,11 @@ class FiltersAggregate(AttrDict[Any]):
|
|
|
5022
5178
|
class FiltersBucket(AttrDict[Any]):
|
|
5023
5179
|
"""
|
|
5024
5180
|
:arg doc_count: (required)
|
|
5181
|
+
:arg key:
|
|
5025
5182
|
"""
|
|
5026
5183
|
|
|
5027
5184
|
doc_count: int
|
|
5185
|
+
key: str
|
|
5028
5186
|
|
|
5029
5187
|
|
|
5030
5188
|
class FrequentItemSetsAggregate(AttrDict[Any]):
|
elasticsearch/dsl/utils.py
CHANGED
|
@@ -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
|
|
336
|
+
if pvalue is DEFAULT:
|
|
337
337
|
continue
|
|
338
338
|
# expand "__" to dots
|
|
339
339
|
if "__" in pname and _expand__to_dot:
|