elasticsearch 8.18.1__py3-none-any.whl → 8.19.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/_async/client/__init__.py +56 -76
- elasticsearch/_async/client/async_search.py +5 -9
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +620 -65
- elasticsearch/_async/client/ccr.py +13 -13
- elasticsearch/_async/client/cluster.py +31 -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 +13 -5
- elasticsearch/_async/client/esql.py +38 -9
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +13 -13
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +11 -11
- elasticsearch/_async/client/indices.py +131 -82
- elasticsearch/_async/client/inference.py +411 -112
- elasticsearch/_async/client/ingest.py +9 -16
- elasticsearch/_async/client/license.py +10 -10
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +76 -88
- elasticsearch/_async/client/nodes.py +9 -8
- elasticsearch/_async/client/query_rules.py +8 -8
- elasticsearch/_async/client/rollup.py +8 -8
- elasticsearch/_async/client/search_application.py +10 -10
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +72 -80
- 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 +19 -13
- elasticsearch/_async/client/sql.py +6 -6
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +7 -7
- elasticsearch/_async/client/tasks.py +3 -3
- elasticsearch/_async/client/text_structure.py +4 -4
- elasticsearch/_async/client/transform.py +9 -9
- elasticsearch/_async/client/xpack.py +1 -1
- elasticsearch/_sync/client/__init__.py +56 -76
- elasticsearch/_sync/client/async_search.py +5 -9
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +620 -65
- elasticsearch/_sync/client/ccr.py +13 -13
- elasticsearch/_sync/client/cluster.py +31 -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 +13 -5
- elasticsearch/_sync/client/esql.py +38 -9
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +13 -13
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +11 -11
- elasticsearch/_sync/client/indices.py +131 -82
- elasticsearch/_sync/client/inference.py +411 -112
- elasticsearch/_sync/client/ingest.py +9 -16
- elasticsearch/_sync/client/license.py +10 -10
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +76 -88
- elasticsearch/_sync/client/nodes.py +9 -8
- elasticsearch/_sync/client/query_rules.py +8 -8
- elasticsearch/_sync/client/rollup.py +8 -8
- elasticsearch/_sync/client/search_application.py +10 -10
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +72 -80
- 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 +19 -13
- elasticsearch/_sync/client/sql.py +6 -6
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +7 -7
- elasticsearch/_sync/client/tasks.py +3 -3
- elasticsearch/_sync/client/text_structure.py +4 -4
- elasticsearch/_sync/client/transform.py +9 -9
- elasticsearch/_sync/client/xpack.py +1 -1
- elasticsearch/_version.py +1 -1
- elasticsearch/compat.py +5 -0
- elasticsearch/dsl/__init__.py +2 -1
- elasticsearch/dsl/_async/document.py +1 -1
- elasticsearch/dsl/_sync/document.py +1 -1
- elasticsearch/dsl/aggs.py +2 -3
- elasticsearch/dsl/document_base.py +176 -16
- elasticsearch/dsl/field.py +223 -38
- elasticsearch/dsl/query.py +49 -4
- elasticsearch/dsl/types.py +107 -16
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/esql/__init__.py +18 -0
- elasticsearch/esql/esql.py +1105 -0
- elasticsearch/esql/functions.py +1738 -0
- elasticsearch/exceptions.py +2 -0
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/METADATA +1 -3
- elasticsearch-8.19.0.dist-info/RECORD +164 -0
- elasticsearch-8.18.1.dist-info/RECORD +0 -163
- elasticsearch-8.18.1.dist-info/licenses/LICENSE.txt +0 -175
- elasticsearch-8.18.1.dist-info/licenses/NOTICE.txt +0 -559
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/WHEEL +0 -0
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.0.dist-info}/licenses/NOTICE +0 -0
elasticsearch/dsl/types.py
CHANGED
|
@@ -927,7 +927,7 @@ class GeoDistanceSort(AttrDict[Any]):
|
|
|
927
927
|
|
|
928
928
|
class GeoGridQuery(AttrDict[Any]):
|
|
929
929
|
"""
|
|
930
|
-
:arg
|
|
930
|
+
:arg geotile:
|
|
931
931
|
:arg geohash:
|
|
932
932
|
:arg geohex:
|
|
933
933
|
:arg boost: Floating point number used to decrease or increase the
|
|
@@ -938,7 +938,7 @@ class GeoGridQuery(AttrDict[Any]):
|
|
|
938
938
|
:arg _name:
|
|
939
939
|
"""
|
|
940
940
|
|
|
941
|
-
|
|
941
|
+
geotile: Union[str, DefaultType]
|
|
942
942
|
geohash: Union[str, DefaultType]
|
|
943
943
|
geohex: Union[str, DefaultType]
|
|
944
944
|
boost: Union[float, DefaultType]
|
|
@@ -947,15 +947,15 @@ class GeoGridQuery(AttrDict[Any]):
|
|
|
947
947
|
def __init__(
|
|
948
948
|
self,
|
|
949
949
|
*,
|
|
950
|
-
|
|
950
|
+
geotile: Union[str, DefaultType] = DEFAULT,
|
|
951
951
|
geohash: Union[str, DefaultType] = DEFAULT,
|
|
952
952
|
geohex: Union[str, DefaultType] = DEFAULT,
|
|
953
953
|
boost: Union[float, DefaultType] = DEFAULT,
|
|
954
954
|
_name: Union[str, DefaultType] = DEFAULT,
|
|
955
955
|
**kwargs: Any,
|
|
956
956
|
):
|
|
957
|
-
if
|
|
958
|
-
kwargs["
|
|
957
|
+
if geotile is not DEFAULT:
|
|
958
|
+
kwargs["geotile"] = geotile
|
|
959
959
|
if geohash is not DEFAULT:
|
|
960
960
|
kwargs["geohash"] = geohash
|
|
961
961
|
if geohex is not DEFAULT:
|
|
@@ -1617,11 +1617,7 @@ class InnerHits(AttrDict[Any]):
|
|
|
1617
1617
|
DefaultType,
|
|
1618
1618
|
]
|
|
1619
1619
|
seq_no_primary_term: Union[bool, DefaultType]
|
|
1620
|
-
fields: Union[
|
|
1621
|
-
Union[str, InstrumentedField],
|
|
1622
|
-
Sequence[Union[str, InstrumentedField]],
|
|
1623
|
-
DefaultType,
|
|
1624
|
-
]
|
|
1620
|
+
fields: Union[Sequence[Union[str, InstrumentedField]], DefaultType]
|
|
1625
1621
|
sort: Union[
|
|
1626
1622
|
Union[Union[str, InstrumentedField], "SortOptions"],
|
|
1627
1623
|
Sequence[Union[Union[str, InstrumentedField], "SortOptions"]],
|
|
@@ -1656,11 +1652,7 @@ class InnerHits(AttrDict[Any]):
|
|
|
1656
1652
|
DefaultType,
|
|
1657
1653
|
] = DEFAULT,
|
|
1658
1654
|
seq_no_primary_term: Union[bool, DefaultType] = DEFAULT,
|
|
1659
|
-
fields: Union[
|
|
1660
|
-
Union[str, InstrumentedField],
|
|
1661
|
-
Sequence[Union[str, InstrumentedField]],
|
|
1662
|
-
DefaultType,
|
|
1663
|
-
] = DEFAULT,
|
|
1655
|
+
fields: Union[Sequence[Union[str, InstrumentedField]], DefaultType] = DEFAULT,
|
|
1664
1656
|
sort: Union[
|
|
1665
1657
|
Union[Union[str, InstrumentedField], "SortOptions"],
|
|
1666
1658
|
Sequence[Union[Union[str, InstrumentedField], "SortOptions"]],
|
|
@@ -1789,6 +1781,8 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1789
1781
|
:arg match: Matches analyzed text.
|
|
1790
1782
|
:arg prefix: Matches terms that start with a specified set of
|
|
1791
1783
|
characters.
|
|
1784
|
+
:arg range:
|
|
1785
|
+
:arg regexp:
|
|
1792
1786
|
:arg wildcard: Matches terms using a wildcard pattern.
|
|
1793
1787
|
"""
|
|
1794
1788
|
|
|
@@ -1797,6 +1791,8 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1797
1791
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
|
|
1798
1792
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
|
|
1799
1793
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
|
|
1794
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType]
|
|
1795
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
|
|
1800
1796
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
|
|
1801
1797
|
|
|
1802
1798
|
def __init__(
|
|
@@ -1807,6 +1803,8 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1807
1803
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1808
1804
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1809
1805
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1806
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1807
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1810
1808
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
|
|
1811
1809
|
**kwargs: Any,
|
|
1812
1810
|
):
|
|
@@ -1820,6 +1818,10 @@ class IntervalsContainer(AttrDict[Any]):
|
|
|
1820
1818
|
kwargs["match"] = match
|
|
1821
1819
|
if prefix is not DEFAULT:
|
|
1822
1820
|
kwargs["prefix"] = prefix
|
|
1821
|
+
if range is not DEFAULT:
|
|
1822
|
+
kwargs["range"] = range
|
|
1823
|
+
if regexp is not DEFAULT:
|
|
1824
|
+
kwargs["regexp"] = regexp
|
|
1823
1825
|
if wildcard is not DEFAULT:
|
|
1824
1826
|
kwargs["wildcard"] = wildcard
|
|
1825
1827
|
super().__init__(kwargs)
|
|
@@ -2040,6 +2042,8 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2040
2042
|
:arg match: Matches analyzed text.
|
|
2041
2043
|
:arg prefix: Matches terms that start with a specified set of
|
|
2042
2044
|
characters.
|
|
2045
|
+
:arg range:
|
|
2046
|
+
:arg regexp:
|
|
2043
2047
|
:arg wildcard: Matches terms using a wildcard pattern.
|
|
2044
2048
|
:arg boost: Floating point number used to decrease or increase the
|
|
2045
2049
|
relevance scores of the query. Boost values are relative to the
|
|
@@ -2054,6 +2058,8 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2054
2058
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType]
|
|
2055
2059
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType]
|
|
2056
2060
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType]
|
|
2061
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType]
|
|
2062
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType]
|
|
2057
2063
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType]
|
|
2058
2064
|
boost: Union[float, DefaultType]
|
|
2059
2065
|
_name: Union[str, DefaultType]
|
|
@@ -2066,6 +2072,8 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2066
2072
|
fuzzy: Union["IntervalsFuzzy", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2067
2073
|
match: Union["IntervalsMatch", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2068
2074
|
prefix: Union["IntervalsPrefix", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2075
|
+
range: Union["IntervalsRange", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2076
|
+
regexp: Union["IntervalsRegexp", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2069
2077
|
wildcard: Union["IntervalsWildcard", Dict[str, Any], DefaultType] = DEFAULT,
|
|
2070
2078
|
boost: Union[float, DefaultType] = DEFAULT,
|
|
2071
2079
|
_name: Union[str, DefaultType] = DEFAULT,
|
|
@@ -2081,6 +2089,10 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2081
2089
|
kwargs["match"] = match
|
|
2082
2090
|
if prefix is not DEFAULT:
|
|
2083
2091
|
kwargs["prefix"] = prefix
|
|
2092
|
+
if range is not DEFAULT:
|
|
2093
|
+
kwargs["range"] = range
|
|
2094
|
+
if regexp is not DEFAULT:
|
|
2095
|
+
kwargs["regexp"] = regexp
|
|
2084
2096
|
if wildcard is not DEFAULT:
|
|
2085
2097
|
kwargs["wildcard"] = wildcard
|
|
2086
2098
|
if boost is not DEFAULT:
|
|
@@ -2090,6 +2102,83 @@ class IntervalsQuery(AttrDict[Any]):
|
|
|
2090
2102
|
super().__init__(kwargs)
|
|
2091
2103
|
|
|
2092
2104
|
|
|
2105
|
+
class IntervalsRange(AttrDict[Any]):
|
|
2106
|
+
"""
|
|
2107
|
+
:arg analyzer: Analyzer used to analyze the `prefix`.
|
|
2108
|
+
:arg gte: Lower term, either gte or gt must be provided.
|
|
2109
|
+
:arg gt: Lower term, either gte or gt must be provided.
|
|
2110
|
+
:arg lte: Upper term, either lte or lt must be provided.
|
|
2111
|
+
:arg lt: Upper term, either lte or lt must be provided.
|
|
2112
|
+
:arg use_field: If specified, match intervals from this field rather
|
|
2113
|
+
than the top-level field. The `prefix` is normalized using the
|
|
2114
|
+
search analyzer from this field, unless `analyzer` is specified
|
|
2115
|
+
separately.
|
|
2116
|
+
"""
|
|
2117
|
+
|
|
2118
|
+
analyzer: Union[str, DefaultType]
|
|
2119
|
+
gte: Union[str, DefaultType]
|
|
2120
|
+
gt: Union[str, DefaultType]
|
|
2121
|
+
lte: Union[str, DefaultType]
|
|
2122
|
+
lt: Union[str, DefaultType]
|
|
2123
|
+
use_field: Union[str, InstrumentedField, DefaultType]
|
|
2124
|
+
|
|
2125
|
+
def __init__(
|
|
2126
|
+
self,
|
|
2127
|
+
*,
|
|
2128
|
+
analyzer: Union[str, DefaultType] = DEFAULT,
|
|
2129
|
+
gte: Union[str, DefaultType] = DEFAULT,
|
|
2130
|
+
gt: Union[str, DefaultType] = DEFAULT,
|
|
2131
|
+
lte: Union[str, DefaultType] = DEFAULT,
|
|
2132
|
+
lt: Union[str, DefaultType] = DEFAULT,
|
|
2133
|
+
use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
|
|
2134
|
+
**kwargs: Any,
|
|
2135
|
+
):
|
|
2136
|
+
if analyzer is not DEFAULT:
|
|
2137
|
+
kwargs["analyzer"] = analyzer
|
|
2138
|
+
if gte is not DEFAULT:
|
|
2139
|
+
kwargs["gte"] = gte
|
|
2140
|
+
if gt is not DEFAULT:
|
|
2141
|
+
kwargs["gt"] = gt
|
|
2142
|
+
if lte is not DEFAULT:
|
|
2143
|
+
kwargs["lte"] = lte
|
|
2144
|
+
if lt is not DEFAULT:
|
|
2145
|
+
kwargs["lt"] = lt
|
|
2146
|
+
if use_field is not DEFAULT:
|
|
2147
|
+
kwargs["use_field"] = str(use_field)
|
|
2148
|
+
super().__init__(kwargs)
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
class IntervalsRegexp(AttrDict[Any]):
|
|
2152
|
+
"""
|
|
2153
|
+
:arg pattern: (required) Regex pattern.
|
|
2154
|
+
:arg analyzer: Analyzer used to analyze the `prefix`.
|
|
2155
|
+
:arg use_field: If specified, match intervals from this field rather
|
|
2156
|
+
than the top-level field. The `prefix` is normalized using the
|
|
2157
|
+
search analyzer from this field, unless `analyzer` is specified
|
|
2158
|
+
separately.
|
|
2159
|
+
"""
|
|
2160
|
+
|
|
2161
|
+
pattern: Union[str, DefaultType]
|
|
2162
|
+
analyzer: Union[str, DefaultType]
|
|
2163
|
+
use_field: Union[str, InstrumentedField, DefaultType]
|
|
2164
|
+
|
|
2165
|
+
def __init__(
|
|
2166
|
+
self,
|
|
2167
|
+
*,
|
|
2168
|
+
pattern: Union[str, DefaultType] = DEFAULT,
|
|
2169
|
+
analyzer: Union[str, DefaultType] = DEFAULT,
|
|
2170
|
+
use_field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
|
|
2171
|
+
**kwargs: Any,
|
|
2172
|
+
):
|
|
2173
|
+
if pattern is not DEFAULT:
|
|
2174
|
+
kwargs["pattern"] = pattern
|
|
2175
|
+
if analyzer is not DEFAULT:
|
|
2176
|
+
kwargs["analyzer"] = analyzer
|
|
2177
|
+
if use_field is not DEFAULT:
|
|
2178
|
+
kwargs["use_field"] = str(use_field)
|
|
2179
|
+
super().__init__(kwargs)
|
|
2180
|
+
|
|
2181
|
+
|
|
2093
2182
|
class IntervalsWildcard(AttrDict[Any]):
|
|
2094
2183
|
"""
|
|
2095
2184
|
:arg pattern: (required) Wildcard pattern used to find matching terms.
|
|
@@ -4794,7 +4883,7 @@ class ErrorCause(AttrDict[Any]):
|
|
|
4794
4883
|
"""
|
|
4795
4884
|
|
|
4796
4885
|
type: str
|
|
4797
|
-
reason: str
|
|
4886
|
+
reason: Union[str, None]
|
|
4798
4887
|
stack_trace: str
|
|
4799
4888
|
caused_by: "ErrorCause"
|
|
4800
4889
|
root_cause: Sequence["ErrorCause"]
|
|
@@ -5010,9 +5099,11 @@ class FiltersAggregate(AttrDict[Any]):
|
|
|
5010
5099
|
class FiltersBucket(AttrDict[Any]):
|
|
5011
5100
|
"""
|
|
5012
5101
|
:arg doc_count: (required)
|
|
5102
|
+
:arg key:
|
|
5013
5103
|
"""
|
|
5014
5104
|
|
|
5015
5105
|
doc_count: int
|
|
5106
|
+
key: str
|
|
5016
5107
|
|
|
5017
5108
|
|
|
5018
5109
|
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:
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
|
3
|
+
# this work for additional information regarding copyright
|
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
|
6
|
+
# not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from .esql import ESQL, and_, not_, or_ # noqa: F401
|