elasticsearch 8.19.1__py3-none-any.whl → 8.19.3__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/_async/client/__init__.py +66 -67
- elasticsearch/_async/client/async_search.py +3 -3
- elasticsearch/_async/client/autoscaling.py +8 -4
- elasticsearch/_async/client/cat.py +521 -27
- elasticsearch/_async/client/ccr.py +2 -2
- elasticsearch/_async/client/cluster.py +10 -9
- elasticsearch/_async/client/connector.py +37 -36
- elasticsearch/_async/client/dangling_indices.py +6 -10
- elasticsearch/_async/client/eql.py +2 -2
- elasticsearch/_async/client/esql.py +1 -1
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +4 -8
- elasticsearch/_async/client/graph.py +1 -5
- elasticsearch/_async/client/ilm.py +2 -10
- elasticsearch/_async/client/indices.py +393 -56
- elasticsearch/_async/client/inference.py +35 -121
- elasticsearch/_async/client/ingest.py +1 -1
- elasticsearch/_async/client/license.py +3 -5
- elasticsearch/_async/client/ml.py +61 -21
- elasticsearch/_async/client/monitoring.py +2 -1
- elasticsearch/_async/client/nodes.py +9 -9
- elasticsearch/_async/client/rollup.py +9 -9
- elasticsearch/_async/client/search_application.py +11 -11
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +4 -4
- elasticsearch/_async/client/shutdown.py +12 -17
- elasticsearch/_async/client/simulate.py +2 -2
- elasticsearch/_async/client/slm.py +2 -6
- elasticsearch/_async/client/snapshot.py +3 -2
- elasticsearch/_async/client/streams.py +185 -0
- elasticsearch/_async/client/tasks.py +4 -4
- elasticsearch/_async/client/text_structure.py +5 -1
- elasticsearch/_async/client/transform.py +37 -0
- elasticsearch/_async/client/utils.py +4 -2
- elasticsearch/_async/client/watcher.py +3 -7
- elasticsearch/_async/client/xpack.py +2 -1
- elasticsearch/_async/helpers.py +58 -9
- elasticsearch/_sync/client/__init__.py +68 -67
- elasticsearch/_sync/client/async_search.py +3 -3
- elasticsearch/_sync/client/autoscaling.py +8 -4
- elasticsearch/_sync/client/cat.py +521 -27
- elasticsearch/_sync/client/ccr.py +2 -2
- elasticsearch/_sync/client/cluster.py +10 -9
- elasticsearch/_sync/client/connector.py +37 -36
- elasticsearch/_sync/client/dangling_indices.py +6 -10
- elasticsearch/_sync/client/eql.py +2 -2
- elasticsearch/_sync/client/esql.py +1 -1
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +4 -8
- elasticsearch/_sync/client/graph.py +1 -5
- elasticsearch/_sync/client/ilm.py +2 -10
- elasticsearch/_sync/client/indices.py +393 -56
- elasticsearch/_sync/client/inference.py +35 -121
- elasticsearch/_sync/client/ingest.py +1 -1
- elasticsearch/_sync/client/license.py +3 -5
- elasticsearch/_sync/client/ml.py +61 -21
- elasticsearch/_sync/client/monitoring.py +2 -1
- elasticsearch/_sync/client/nodes.py +9 -9
- elasticsearch/_sync/client/rollup.py +9 -9
- elasticsearch/_sync/client/search_application.py +11 -11
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +4 -4
- elasticsearch/_sync/client/shutdown.py +12 -17
- elasticsearch/_sync/client/simulate.py +2 -2
- elasticsearch/_sync/client/slm.py +2 -6
- elasticsearch/_sync/client/snapshot.py +3 -2
- elasticsearch/_sync/client/streams.py +185 -0
- elasticsearch/_sync/client/tasks.py +4 -4
- elasticsearch/_sync/client/text_structure.py +5 -1
- elasticsearch/_sync/client/transform.py +37 -0
- elasticsearch/_sync/client/utils.py +16 -2
- elasticsearch/_sync/client/watcher.py +3 -7
- elasticsearch/_sync/client/xpack.py +2 -1
- elasticsearch/_version.py +2 -1
- elasticsearch/client.py +2 -0
- elasticsearch/compat.py +45 -1
- elasticsearch/dsl/__init__.py +28 -0
- elasticsearch/dsl/_async/document.py +4 -5
- elasticsearch/dsl/_async/index.py +1 -1
- elasticsearch/dsl/_async/search.py +2 -3
- elasticsearch/dsl/_sync/document.py +4 -5
- elasticsearch/dsl/_sync/index.py +1 -1
- elasticsearch/dsl/_sync/search.py +2 -3
- elasticsearch/dsl/aggs.py +104 -7
- elasticsearch/dsl/async_connections.py +1 -2
- elasticsearch/dsl/connections.py +1 -2
- elasticsearch/dsl/document_base.py +16 -1
- elasticsearch/dsl/field.py +12 -1
- elasticsearch/dsl/query.py +24 -1
- elasticsearch/dsl/response/__init__.py +3 -0
- elasticsearch/dsl/serializer.py +1 -2
- elasticsearch/dsl/types.py +187 -9
- elasticsearch/dsl/utils.py +1 -2
- elasticsearch/esql/esql.py +1 -1
- elasticsearch/esql/functions.py +2 -2
- elasticsearch/helpers/__init__.py +10 -1
- elasticsearch/helpers/actions.py +106 -33
- elasticsearch/helpers/vectorstore/__init__.py +7 -7
- elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +5 -5
- elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +5 -5
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/METADATA +2 -2
- elasticsearch-8.19.3.dist-info/RECORD +166 -0
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/WHEEL +1 -1
- elasticsearch-8.19.1.dist-info/RECORD +0 -164
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.3.dist-info}/licenses/NOTICE +0 -0
elasticsearch/dsl/field.py
CHANGED
|
@@ -572,7 +572,11 @@ class Object(Field):
|
|
|
572
572
|
if isinstance(data, collections.abc.Mapping):
|
|
573
573
|
return data
|
|
574
574
|
|
|
575
|
-
|
|
575
|
+
try:
|
|
576
|
+
return data.to_dict(skip_empty=skip_empty)
|
|
577
|
+
except TypeError:
|
|
578
|
+
# this would only happen if an AttrDict was given instead of an InnerDoc
|
|
579
|
+
return data.to_dict()
|
|
576
580
|
|
|
577
581
|
def clean(self, data: Any) -> Any:
|
|
578
582
|
data = super().clean(data)
|
|
@@ -3870,9 +3874,13 @@ class SemanticText(Field):
|
|
|
3870
3874
|
sent in the inference endpoint associated with inference_id. If
|
|
3871
3875
|
chunking settings are updated, they will not be applied to
|
|
3872
3876
|
existing documents until they are reindexed.
|
|
3877
|
+
:arg fields:
|
|
3873
3878
|
"""
|
|
3874
3879
|
|
|
3875
3880
|
name = "semantic_text"
|
|
3881
|
+
_param_defs = {
|
|
3882
|
+
"fields": {"type": "field", "hash": True},
|
|
3883
|
+
}
|
|
3876
3884
|
|
|
3877
3885
|
def __init__(
|
|
3878
3886
|
self,
|
|
@@ -3886,6 +3894,7 @@ class SemanticText(Field):
|
|
|
3886
3894
|
chunking_settings: Union[
|
|
3887
3895
|
"types.ChunkingSettings", Dict[str, Any], "DefaultType"
|
|
3888
3896
|
] = DEFAULT,
|
|
3897
|
+
fields: Union[Mapping[str, Field], "DefaultType"] = DEFAULT,
|
|
3889
3898
|
**kwargs: Any,
|
|
3890
3899
|
):
|
|
3891
3900
|
if meta is not DEFAULT:
|
|
@@ -3898,6 +3907,8 @@ class SemanticText(Field):
|
|
|
3898
3907
|
kwargs["index_options"] = index_options
|
|
3899
3908
|
if chunking_settings is not DEFAULT:
|
|
3900
3909
|
kwargs["chunking_settings"] = chunking_settings
|
|
3910
|
+
if fields is not DEFAULT:
|
|
3911
|
+
kwargs["fields"] = fields
|
|
3901
3912
|
super().__init__(*args, **kwargs)
|
|
3902
3913
|
|
|
3903
3914
|
|
elasticsearch/dsl/query.py
CHANGED
|
@@ -370,6 +370,7 @@ class Common(Query):
|
|
|
370
370
|
_value: Union[
|
|
371
371
|
"types.CommonTermsQuery", Dict[str, Any], "DefaultType"
|
|
372
372
|
] = DEFAULT,
|
|
373
|
+
/,
|
|
373
374
|
**kwargs: Any,
|
|
374
375
|
):
|
|
375
376
|
if _field is not DEFAULT:
|
|
@@ -666,6 +667,7 @@ class Fuzzy(Query):
|
|
|
666
667
|
self,
|
|
667
668
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
668
669
|
_value: Union["types.FuzzyQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
670
|
+
/,
|
|
669
671
|
**kwargs: Any,
|
|
670
672
|
):
|
|
671
673
|
if _field is not DEFAULT:
|
|
@@ -708,6 +710,7 @@ class GeoBoundingBox(Query):
|
|
|
708
710
|
Dict[str, Any],
|
|
709
711
|
"DefaultType",
|
|
710
712
|
] = DEFAULT,
|
|
713
|
+
/,
|
|
711
714
|
*,
|
|
712
715
|
type: Union[Literal["memory", "indexed"], "DefaultType"] = DEFAULT,
|
|
713
716
|
validation_method: Union[
|
|
@@ -771,6 +774,7 @@ class GeoDistance(Query):
|
|
|
771
774
|
Dict[str, Any],
|
|
772
775
|
"DefaultType",
|
|
773
776
|
] = DEFAULT,
|
|
777
|
+
/,
|
|
774
778
|
*,
|
|
775
779
|
distance: Union[str, "DefaultType"] = DEFAULT,
|
|
776
780
|
distance_type: Union[Literal["arc", "plane"], "DefaultType"] = DEFAULT,
|
|
@@ -810,6 +814,7 @@ class GeoGrid(Query):
|
|
|
810
814
|
self,
|
|
811
815
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
812
816
|
_value: Union["types.GeoGridQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
817
|
+
/,
|
|
813
818
|
**kwargs: Any,
|
|
814
819
|
):
|
|
815
820
|
if _field is not DEFAULT:
|
|
@@ -839,6 +844,7 @@ class GeoPolygon(Query):
|
|
|
839
844
|
_value: Union[
|
|
840
845
|
"types.GeoPolygonPoints", Dict[str, Any], "DefaultType"
|
|
841
846
|
] = DEFAULT,
|
|
847
|
+
/,
|
|
842
848
|
*,
|
|
843
849
|
validation_method: Union[
|
|
844
850
|
Literal["coerce", "ignore_malformed", "strict"], "DefaultType"
|
|
@@ -885,6 +891,7 @@ class GeoShape(Query):
|
|
|
885
891
|
_value: Union[
|
|
886
892
|
"types.GeoShapeFieldQuery", Dict[str, Any], "DefaultType"
|
|
887
893
|
] = DEFAULT,
|
|
894
|
+
/,
|
|
888
895
|
*,
|
|
889
896
|
ignore_unmapped: Union[bool, "DefaultType"] = DEFAULT,
|
|
890
897
|
boost: Union[float, "DefaultType"] = DEFAULT,
|
|
@@ -1060,6 +1067,7 @@ class Intervals(Query):
|
|
|
1060
1067
|
self,
|
|
1061
1068
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
1062
1069
|
_value: Union["types.IntervalsQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
1070
|
+
/,
|
|
1063
1071
|
**kwargs: Any,
|
|
1064
1072
|
):
|
|
1065
1073
|
if _field is not DEFAULT:
|
|
@@ -1147,6 +1155,7 @@ class Match(Query):
|
|
|
1147
1155
|
self,
|
|
1148
1156
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
1149
1157
|
_value: Union["types.MatchQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
1158
|
+
/,
|
|
1150
1159
|
**kwargs: Any,
|
|
1151
1160
|
):
|
|
1152
1161
|
if _field is not DEFAULT:
|
|
@@ -1212,6 +1221,7 @@ class MatchBoolPrefix(Query):
|
|
|
1212
1221
|
_value: Union[
|
|
1213
1222
|
"types.MatchBoolPrefixQuery", Dict[str, Any], "DefaultType"
|
|
1214
1223
|
] = DEFAULT,
|
|
1224
|
+
/,
|
|
1215
1225
|
**kwargs: Any,
|
|
1216
1226
|
):
|
|
1217
1227
|
if _field is not DEFAULT:
|
|
@@ -1272,6 +1282,7 @@ class MatchPhrase(Query):
|
|
|
1272
1282
|
_value: Union[
|
|
1273
1283
|
"types.MatchPhraseQuery", Dict[str, Any], "DefaultType"
|
|
1274
1284
|
] = DEFAULT,
|
|
1285
|
+
/,
|
|
1275
1286
|
**kwargs: Any,
|
|
1276
1287
|
):
|
|
1277
1288
|
if _field is not DEFAULT:
|
|
@@ -1297,6 +1308,7 @@ class MatchPhrasePrefix(Query):
|
|
|
1297
1308
|
_value: Union[
|
|
1298
1309
|
"types.MatchPhrasePrefixQuery", Dict[str, Any], "DefaultType"
|
|
1299
1310
|
] = DEFAULT,
|
|
1311
|
+
/,
|
|
1300
1312
|
**kwargs: Any,
|
|
1301
1313
|
):
|
|
1302
1314
|
if _field is not DEFAULT:
|
|
@@ -1433,7 +1445,7 @@ class MoreLikeThis(Query):
|
|
|
1433
1445
|
] = DEFAULT,
|
|
1434
1446
|
version: Union[int, "DefaultType"] = DEFAULT,
|
|
1435
1447
|
version_type: Union[
|
|
1436
|
-
Literal["internal", "external", "external_gte"
|
|
1448
|
+
Literal["internal", "external", "external_gte"], "DefaultType"
|
|
1437
1449
|
] = DEFAULT,
|
|
1438
1450
|
boost: Union[float, "DefaultType"] = DEFAULT,
|
|
1439
1451
|
_name: Union[str, "DefaultType"] = DEFAULT,
|
|
@@ -1780,6 +1792,7 @@ class Prefix(Query):
|
|
|
1780
1792
|
self,
|
|
1781
1793
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
1782
1794
|
_value: Union["types.PrefixQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
1795
|
+
/,
|
|
1783
1796
|
**kwargs: Any,
|
|
1784
1797
|
):
|
|
1785
1798
|
if _field is not DEFAULT:
|
|
@@ -1946,6 +1959,7 @@ class Range(Query):
|
|
|
1946
1959
|
self,
|
|
1947
1960
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
1948
1961
|
_value: Union["wrappers.Range[Any]", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
1962
|
+
/,
|
|
1949
1963
|
**kwargs: Any,
|
|
1950
1964
|
):
|
|
1951
1965
|
if _field is not DEFAULT:
|
|
@@ -2024,6 +2038,7 @@ class Regexp(Query):
|
|
|
2024
2038
|
self,
|
|
2025
2039
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
2026
2040
|
_value: Union["types.RegexpQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2041
|
+
/,
|
|
2027
2042
|
**kwargs: Any,
|
|
2028
2043
|
):
|
|
2029
2044
|
if _field is not DEFAULT:
|
|
@@ -2194,6 +2209,7 @@ class Shape(Query):
|
|
|
2194
2209
|
self,
|
|
2195
2210
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
2196
2211
|
_value: Union["types.ShapeFieldQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2212
|
+
/,
|
|
2197
2213
|
*,
|
|
2198
2214
|
ignore_unmapped: Union[bool, "DefaultType"] = DEFAULT,
|
|
2199
2215
|
boost: Union[float, "DefaultType"] = DEFAULT,
|
|
@@ -2552,6 +2568,7 @@ class SpanTerm(Query):
|
|
|
2552
2568
|
self,
|
|
2553
2569
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
2554
2570
|
_value: Union["types.SpanTermQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2571
|
+
/,
|
|
2555
2572
|
**kwargs: Any,
|
|
2556
2573
|
):
|
|
2557
2574
|
if _field is not DEFAULT:
|
|
@@ -2672,6 +2689,7 @@ class Term(Query):
|
|
|
2672
2689
|
self,
|
|
2673
2690
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
2674
2691
|
_value: Union["types.TermQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2692
|
+
/,
|
|
2675
2693
|
**kwargs: Any,
|
|
2676
2694
|
):
|
|
2677
2695
|
if _field is not DEFAULT:
|
|
@@ -2706,6 +2724,7 @@ class Terms(Query):
|
|
|
2706
2724
|
Dict[str, Any],
|
|
2707
2725
|
"DefaultType",
|
|
2708
2726
|
] = DEFAULT,
|
|
2727
|
+
/,
|
|
2709
2728
|
*,
|
|
2710
2729
|
boost: Union[float, "DefaultType"] = DEFAULT,
|
|
2711
2730
|
_name: Union[str, "DefaultType"] = DEFAULT,
|
|
@@ -2739,6 +2758,7 @@ class TermsSet(Query):
|
|
|
2739
2758
|
self,
|
|
2740
2759
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
2741
2760
|
_value: Union["types.TermsSetQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2761
|
+
/,
|
|
2742
2762
|
**kwargs: Any,
|
|
2743
2763
|
):
|
|
2744
2764
|
if _field is not DEFAULT:
|
|
@@ -2764,6 +2784,7 @@ class TextExpansion(Query):
|
|
|
2764
2784
|
_value: Union[
|
|
2765
2785
|
"types.TextExpansionQuery", Dict[str, Any], "DefaultType"
|
|
2766
2786
|
] = DEFAULT,
|
|
2787
|
+
/,
|
|
2767
2788
|
**kwargs: Any,
|
|
2768
2789
|
):
|
|
2769
2790
|
if _field is not DEFAULT:
|
|
@@ -2788,6 +2809,7 @@ class WeightedTokens(Query):
|
|
|
2788
2809
|
_value: Union[
|
|
2789
2810
|
"types.WeightedTokensQuery", Dict[str, Any], "DefaultType"
|
|
2790
2811
|
] = DEFAULT,
|
|
2812
|
+
/,
|
|
2791
2813
|
**kwargs: Any,
|
|
2792
2814
|
):
|
|
2793
2815
|
if _field is not DEFAULT:
|
|
@@ -2809,6 +2831,7 @@ class Wildcard(Query):
|
|
|
2809
2831
|
self,
|
|
2810
2832
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
2811
2833
|
_value: Union["types.WildcardQuery", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
2834
|
+
/,
|
|
2812
2835
|
**kwargs: Any,
|
|
2813
2836
|
):
|
|
2814
2837
|
if _field is not DEFAULT:
|
|
@@ -233,10 +233,13 @@ AggregateResponseType = Union[
|
|
|
233
233
|
"types.SimpleValueAggregate",
|
|
234
234
|
"types.DerivativeAggregate",
|
|
235
235
|
"types.BucketMetricValueAggregate",
|
|
236
|
+
"types.ChangePointAggregate",
|
|
236
237
|
"types.StatsAggregate",
|
|
237
238
|
"types.StatsBucketAggregate",
|
|
238
239
|
"types.ExtendedStatsAggregate",
|
|
239
240
|
"types.ExtendedStatsBucketAggregate",
|
|
241
|
+
"types.CartesianBoundsAggregate",
|
|
242
|
+
"types.CartesianCentroidAggregate",
|
|
240
243
|
"types.GeoBoundsAggregate",
|
|
241
244
|
"types.GeoCentroidAggregate",
|
|
242
245
|
"types.HistogramAggregate",
|
elasticsearch/dsl/serializer.py
CHANGED
elasticsearch/dsl/types.py
CHANGED
|
@@ -937,6 +937,7 @@ class GeoDistanceSort(AttrDict[Any]):
|
|
|
937
937
|
Dict[str, Any],
|
|
938
938
|
"DefaultType",
|
|
939
939
|
] = DEFAULT,
|
|
940
|
+
/,
|
|
940
941
|
*,
|
|
941
942
|
mode: Union[
|
|
942
943
|
Literal["min", "max", "sum", "avg", "median"], DefaultType
|
|
@@ -2323,9 +2324,7 @@ class LikeDocument(AttrDict[Any]):
|
|
|
2323
2324
|
per_field_analyzer: Union[Mapping[Union[str, InstrumentedField], str], DefaultType]
|
|
2324
2325
|
routing: Union[str, DefaultType]
|
|
2325
2326
|
version: Union[int, DefaultType]
|
|
2326
|
-
version_type: Union[
|
|
2327
|
-
Literal["internal", "external", "external_gte", "force"], DefaultType
|
|
2328
|
-
]
|
|
2327
|
+
version_type: Union[Literal["internal", "external", "external_gte"], DefaultType]
|
|
2329
2328
|
|
|
2330
2329
|
def __init__(
|
|
2331
2330
|
self,
|
|
@@ -2340,7 +2339,7 @@ class LikeDocument(AttrDict[Any]):
|
|
|
2340
2339
|
routing: Union[str, DefaultType] = DEFAULT,
|
|
2341
2340
|
version: Union[int, DefaultType] = DEFAULT,
|
|
2342
2341
|
version_type: Union[
|
|
2343
|
-
Literal["internal", "external", "external_gte"
|
|
2342
|
+
Literal["internal", "external", "external_gte"], DefaultType
|
|
2344
2343
|
] = DEFAULT,
|
|
2345
2344
|
**kwargs: Any,
|
|
2346
2345
|
):
|
|
@@ -2771,6 +2770,31 @@ class NumericFielddata(AttrDict[Any]):
|
|
|
2771
2770
|
super().__init__(kwargs)
|
|
2772
2771
|
|
|
2773
2772
|
|
|
2773
|
+
class PValueHeuristic(AttrDict[Any]):
|
|
2774
|
+
"""
|
|
2775
|
+
:arg background_is_superset:
|
|
2776
|
+
:arg normalize_above: Should the results be normalized when above the
|
|
2777
|
+
given value. Allows for consistent significance results at various
|
|
2778
|
+
scales. Note: `0` is a special value which means no normalization
|
|
2779
|
+
"""
|
|
2780
|
+
|
|
2781
|
+
background_is_superset: Union[bool, DefaultType]
|
|
2782
|
+
normalize_above: Union[int, DefaultType]
|
|
2783
|
+
|
|
2784
|
+
def __init__(
|
|
2785
|
+
self,
|
|
2786
|
+
*,
|
|
2787
|
+
background_is_superset: Union[bool, DefaultType] = DEFAULT,
|
|
2788
|
+
normalize_above: Union[int, DefaultType] = DEFAULT,
|
|
2789
|
+
**kwargs: Any,
|
|
2790
|
+
):
|
|
2791
|
+
if background_is_superset is not DEFAULT:
|
|
2792
|
+
kwargs["background_is_superset"] = background_is_superset
|
|
2793
|
+
if normalize_above is not DEFAULT:
|
|
2794
|
+
kwargs["normalize_above"] = normalize_above
|
|
2795
|
+
super().__init__(kwargs)
|
|
2796
|
+
|
|
2797
|
+
|
|
2774
2798
|
class PercentageScoreHeuristic(AttrDict[Any]):
|
|
2775
2799
|
pass
|
|
2776
2800
|
|
|
@@ -3236,6 +3260,7 @@ class SortOptions(AttrDict[Any]):
|
|
|
3236
3260
|
self,
|
|
3237
3261
|
_field: Union[str, "InstrumentedField", "DefaultType"] = DEFAULT,
|
|
3238
3262
|
_value: Union["FieldSort", Dict[str, Any], "DefaultType"] = DEFAULT,
|
|
3263
|
+
/,
|
|
3239
3264
|
*,
|
|
3240
3265
|
_score: Union["ScoreSort", Dict[str, Any], DefaultType] = DEFAULT,
|
|
3241
3266
|
_doc: Union["ScoreSort", Dict[str, Any], DefaultType] = DEFAULT,
|
|
@@ -4024,24 +4049,25 @@ class TestPopulation(AttrDict[Any]):
|
|
|
4024
4049
|
|
|
4025
4050
|
class TextEmbedding(AttrDict[Any]):
|
|
4026
4051
|
"""
|
|
4027
|
-
:arg model_id: (required)
|
|
4028
4052
|
:arg model_text: (required)
|
|
4053
|
+
:arg model_id: Model ID is required for all dense_vector fields but
|
|
4054
|
+
may be inferred for semantic_text fields
|
|
4029
4055
|
"""
|
|
4030
4056
|
|
|
4031
|
-
model_id: Union[str, DefaultType]
|
|
4032
4057
|
model_text: Union[str, DefaultType]
|
|
4058
|
+
model_id: Union[str, DefaultType]
|
|
4033
4059
|
|
|
4034
4060
|
def __init__(
|
|
4035
4061
|
self,
|
|
4036
4062
|
*,
|
|
4037
|
-
model_id: Union[str, DefaultType] = DEFAULT,
|
|
4038
4063
|
model_text: Union[str, DefaultType] = DEFAULT,
|
|
4064
|
+
model_id: Union[str, DefaultType] = DEFAULT,
|
|
4039
4065
|
**kwargs: Any,
|
|
4040
4066
|
):
|
|
4041
|
-
if model_id is not DEFAULT:
|
|
4042
|
-
kwargs["model_id"] = model_id
|
|
4043
4067
|
if model_text is not DEFAULT:
|
|
4044
4068
|
kwargs["model_text"] = model_text
|
|
4069
|
+
if model_id is not DEFAULT:
|
|
4070
|
+
kwargs["model_id"] = model_id
|
|
4045
4071
|
super().__init__(kwargs)
|
|
4046
4072
|
|
|
4047
4073
|
|
|
@@ -4672,6 +4698,82 @@ class CardinalityAggregate(AttrDict[Any]):
|
|
|
4672
4698
|
meta: Mapping[str, Any]
|
|
4673
4699
|
|
|
4674
4700
|
|
|
4701
|
+
class CartesianBoundsAggregate(AttrDict[Any]):
|
|
4702
|
+
"""
|
|
4703
|
+
:arg bounds:
|
|
4704
|
+
:arg meta:
|
|
4705
|
+
"""
|
|
4706
|
+
|
|
4707
|
+
bounds: "TopLeftBottomRightGeoBounds"
|
|
4708
|
+
meta: Mapping[str, Any]
|
|
4709
|
+
|
|
4710
|
+
|
|
4711
|
+
class CartesianCentroidAggregate(AttrDict[Any]):
|
|
4712
|
+
"""
|
|
4713
|
+
:arg count: (required)
|
|
4714
|
+
:arg location:
|
|
4715
|
+
:arg meta:
|
|
4716
|
+
"""
|
|
4717
|
+
|
|
4718
|
+
count: int
|
|
4719
|
+
location: "CartesianPoint"
|
|
4720
|
+
meta: Mapping[str, Any]
|
|
4721
|
+
|
|
4722
|
+
|
|
4723
|
+
class CartesianPoint(AttrDict[Any]):
|
|
4724
|
+
"""
|
|
4725
|
+
:arg x: (required)
|
|
4726
|
+
:arg y: (required)
|
|
4727
|
+
"""
|
|
4728
|
+
|
|
4729
|
+
x: float
|
|
4730
|
+
y: float
|
|
4731
|
+
|
|
4732
|
+
|
|
4733
|
+
class ChangePointAggregate(AttrDict[Any]):
|
|
4734
|
+
"""
|
|
4735
|
+
:arg type: (required)
|
|
4736
|
+
:arg bucket:
|
|
4737
|
+
:arg meta:
|
|
4738
|
+
"""
|
|
4739
|
+
|
|
4740
|
+
type: "ChangeType"
|
|
4741
|
+
bucket: "ChangePointBucket"
|
|
4742
|
+
meta: Mapping[str, Any]
|
|
4743
|
+
|
|
4744
|
+
|
|
4745
|
+
class ChangePointBucket(AttrDict[Any]):
|
|
4746
|
+
"""
|
|
4747
|
+
:arg key: (required)
|
|
4748
|
+
:arg doc_count: (required)
|
|
4749
|
+
"""
|
|
4750
|
+
|
|
4751
|
+
key: Union[int, float, str, bool, None, Any]
|
|
4752
|
+
doc_count: int
|
|
4753
|
+
|
|
4754
|
+
|
|
4755
|
+
class ChangeType(AttrDict[Any]):
|
|
4756
|
+
"""
|
|
4757
|
+
:arg dip:
|
|
4758
|
+
:arg distribution_change:
|
|
4759
|
+
:arg indeterminable:
|
|
4760
|
+
:arg non_stationary:
|
|
4761
|
+
:arg spike:
|
|
4762
|
+
:arg stationary:
|
|
4763
|
+
:arg step_change:
|
|
4764
|
+
:arg trend_change:
|
|
4765
|
+
"""
|
|
4766
|
+
|
|
4767
|
+
dip: "Dip"
|
|
4768
|
+
distribution_change: "DistributionChange"
|
|
4769
|
+
indeterminable: "Indeterminable"
|
|
4770
|
+
non_stationary: "NonStationary"
|
|
4771
|
+
spike: "Spike"
|
|
4772
|
+
stationary: "Stationary"
|
|
4773
|
+
step_change: "StepChange"
|
|
4774
|
+
trend_change: "TrendChange"
|
|
4775
|
+
|
|
4776
|
+
|
|
4675
4777
|
class ChildrenAggregate(AttrDict[Any]):
|
|
4676
4778
|
"""
|
|
4677
4779
|
:arg doc_count: (required)
|
|
@@ -4949,6 +5051,26 @@ class DfsStatisticsProfile(AttrDict[Any]):
|
|
|
4949
5051
|
children: Sequence["DfsStatisticsProfile"]
|
|
4950
5052
|
|
|
4951
5053
|
|
|
5054
|
+
class Dip(AttrDict[Any]):
|
|
5055
|
+
"""
|
|
5056
|
+
:arg p_value: (required)
|
|
5057
|
+
:arg change_point: (required)
|
|
5058
|
+
"""
|
|
5059
|
+
|
|
5060
|
+
p_value: float
|
|
5061
|
+
change_point: int
|
|
5062
|
+
|
|
5063
|
+
|
|
5064
|
+
class DistributionChange(AttrDict[Any]):
|
|
5065
|
+
"""
|
|
5066
|
+
:arg p_value: (required)
|
|
5067
|
+
:arg change_point: (required)
|
|
5068
|
+
"""
|
|
5069
|
+
|
|
5070
|
+
p_value: float
|
|
5071
|
+
change_point: int
|
|
5072
|
+
|
|
5073
|
+
|
|
4952
5074
|
class DoubleTermsAggregate(AttrDict[Any]):
|
|
4953
5075
|
"""
|
|
4954
5076
|
Result of a `terms` aggregation when the field is some kind of decimal
|
|
@@ -5512,6 +5634,14 @@ class HitsMetadata(AttrDict[Any]):
|
|
|
5512
5634
|
max_score: Union[float, None]
|
|
5513
5635
|
|
|
5514
5636
|
|
|
5637
|
+
class Indeterminable(AttrDict[Any]):
|
|
5638
|
+
"""
|
|
5639
|
+
:arg reason: (required)
|
|
5640
|
+
"""
|
|
5641
|
+
|
|
5642
|
+
reason: str
|
|
5643
|
+
|
|
5644
|
+
|
|
5515
5645
|
class InferenceAggregate(AttrDict[Any]):
|
|
5516
5646
|
"""
|
|
5517
5647
|
:arg value:
|
|
@@ -5914,6 +6044,18 @@ class NestedIdentity(AttrDict[Any]):
|
|
|
5914
6044
|
_nested: "NestedIdentity"
|
|
5915
6045
|
|
|
5916
6046
|
|
|
6047
|
+
class NonStationary(AttrDict[Any]):
|
|
6048
|
+
"""
|
|
6049
|
+
:arg p_value: (required)
|
|
6050
|
+
:arg r_value: (required)
|
|
6051
|
+
:arg trend: (required)
|
|
6052
|
+
"""
|
|
6053
|
+
|
|
6054
|
+
p_value: float
|
|
6055
|
+
r_value: float
|
|
6056
|
+
trend: str
|
|
6057
|
+
|
|
6058
|
+
|
|
5917
6059
|
class ParentAggregate(AttrDict[Any]):
|
|
5918
6060
|
"""
|
|
5919
6061
|
:arg doc_count: (required)
|
|
@@ -6271,6 +6413,16 @@ class SimpleValueAggregate(AttrDict[Any]):
|
|
|
6271
6413
|
meta: Mapping[str, Any]
|
|
6272
6414
|
|
|
6273
6415
|
|
|
6416
|
+
class Spike(AttrDict[Any]):
|
|
6417
|
+
"""
|
|
6418
|
+
:arg p_value: (required)
|
|
6419
|
+
:arg change_point: (required)
|
|
6420
|
+
"""
|
|
6421
|
+
|
|
6422
|
+
p_value: float
|
|
6423
|
+
change_point: int
|
|
6424
|
+
|
|
6425
|
+
|
|
6274
6426
|
class StandardDeviationBounds(AttrDict[Any]):
|
|
6275
6427
|
"""
|
|
6276
6428
|
:arg upper: (required)
|
|
@@ -6307,6 +6459,10 @@ class StandardDeviationBoundsAsString(AttrDict[Any]):
|
|
|
6307
6459
|
lower_sampling: str
|
|
6308
6460
|
|
|
6309
6461
|
|
|
6462
|
+
class Stationary(AttrDict[Any]):
|
|
6463
|
+
pass
|
|
6464
|
+
|
|
6465
|
+
|
|
6310
6466
|
class StatsAggregate(AttrDict[Any]):
|
|
6311
6467
|
"""
|
|
6312
6468
|
Statistics aggregation result. `min`, `max` and `avg` are missing if
|
|
@@ -6362,6 +6518,16 @@ class StatsBucketAggregate(AttrDict[Any]):
|
|
|
6362
6518
|
meta: Mapping[str, Any]
|
|
6363
6519
|
|
|
6364
6520
|
|
|
6521
|
+
class StepChange(AttrDict[Any]):
|
|
6522
|
+
"""
|
|
6523
|
+
:arg p_value: (required)
|
|
6524
|
+
:arg change_point: (required)
|
|
6525
|
+
"""
|
|
6526
|
+
|
|
6527
|
+
p_value: float
|
|
6528
|
+
change_point: int
|
|
6529
|
+
|
|
6530
|
+
|
|
6365
6531
|
class StringRareTermsAggregate(AttrDict[Any]):
|
|
6366
6532
|
"""
|
|
6367
6533
|
Result of the `rare_terms` aggregation when the field is a string.
|
|
@@ -6593,6 +6759,18 @@ class TotalHits(AttrDict[Any]):
|
|
|
6593
6759
|
value: int
|
|
6594
6760
|
|
|
6595
6761
|
|
|
6762
|
+
class TrendChange(AttrDict[Any]):
|
|
6763
|
+
"""
|
|
6764
|
+
:arg p_value: (required)
|
|
6765
|
+
:arg r_value: (required)
|
|
6766
|
+
:arg change_point: (required)
|
|
6767
|
+
"""
|
|
6768
|
+
|
|
6769
|
+
p_value: float
|
|
6770
|
+
r_value: float
|
|
6771
|
+
change_point: int
|
|
6772
|
+
|
|
6773
|
+
|
|
6596
6774
|
class UnmappedRareTermsAggregate(AttrDict[Any]):
|
|
6597
6775
|
"""
|
|
6598
6776
|
Result of a `rare_terms` aggregation when the field is unmapped.
|
elasticsearch/dsl/utils.py
CHANGED
|
@@ -44,8 +44,7 @@ from .exceptions import UnknownDslObject, ValidationException
|
|
|
44
44
|
if TYPE_CHECKING:
|
|
45
45
|
from elastic_transport import ObjectApiResponse
|
|
46
46
|
|
|
47
|
-
from
|
|
48
|
-
|
|
47
|
+
from .. import AsyncElasticsearch, Elasticsearch
|
|
49
48
|
from .document_base import DocumentOptions
|
|
50
49
|
from .field import Field
|
|
51
50
|
from .index_base import IndexBase
|
elasticsearch/esql/esql.py
CHANGED
elasticsearch/esql/functions.py
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
import json
|
|
19
19
|
from typing import Any
|
|
20
20
|
|
|
21
|
-
from
|
|
22
|
-
from
|
|
21
|
+
from ..dsl.document_base import InstrumentedExpression
|
|
22
|
+
from ..esql.esql import ESQLBase, ExpressionType
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
def _render(v: Any) -> str:
|
|
@@ -19,12 +19,21 @@ from .._async.helpers import async_bulk, async_reindex, async_scan, async_stream
|
|
|
19
19
|
from .._utils import fixup_module_metadata
|
|
20
20
|
from .actions import _chunk_actions # noqa: F401
|
|
21
21
|
from .actions import _process_bulk_chunk # noqa: F401
|
|
22
|
-
from .actions import
|
|
22
|
+
from .actions import (
|
|
23
|
+
BULK_FLUSH,
|
|
24
|
+
bulk,
|
|
25
|
+
expand_action,
|
|
26
|
+
parallel_bulk,
|
|
27
|
+
reindex,
|
|
28
|
+
scan,
|
|
29
|
+
streaming_bulk,
|
|
30
|
+
)
|
|
23
31
|
from .errors import BulkIndexError, ScanError
|
|
24
32
|
|
|
25
33
|
__all__ = [
|
|
26
34
|
"BulkIndexError",
|
|
27
35
|
"ScanError",
|
|
36
|
+
"BULK_FLUSH",
|
|
28
37
|
"expand_action",
|
|
29
38
|
"streaming_bulk",
|
|
30
39
|
"bulk",
|