Skip to content

Commit 5a0b4e9

Browse files
Auto-generated code for 9.2 (#3326)
* Auto-generated API code * remove streams --------- Co-authored-by: Miguel Grinberg <miguel.grinberg@gmail.com>
1 parent 9ace51b commit 5a0b4e9

File tree

10 files changed

+23
-207
lines changed

10 files changed

+23
-207
lines changed

docs/sphinx/api/streams.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/sphinx/es_api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ arguments are required for all calls.
5151
api/snapshots
5252
api/snapshottable-features
5353
api/sql
54-
api/streams
5554
api/synonyms
5655
api/tls-ssl
5756
api/tasks

elasticsearch/_async/client/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
from .snapshot import SnapshotClient
7676
from .sql import SqlClient
7777
from .ssl import SslClient
78-
from .streams import StreamsClient
7978
from .synonyms import SynonymsClient
8079
from .tasks import TasksClient
8180
from .text_structure import TextStructureClient
@@ -381,7 +380,6 @@ def __init__(
381380
self.shutdown = ShutdownClient(self)
382381
self.sql = SqlClient(self)
383382
self.ssl = SslClient(self)
384-
self.streams = StreamsClient(self)
385383
self.synonyms = SynonymsClient(self)
386384
self.text_structure = TextStructureClient(self)
387385
self.transform = TransformClient(self)

elasticsearch/_async/client/inference.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ async def get(
204204
205205
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get>`_
206206
207-
:param task_type: The task type
208-
:param inference_id: The inference Id
207+
:param task_type: The task type of the endpoint to return
208+
:param inference_id: The inference Id of the endpoint to return. Using `_all`
209+
or `*` will return all endpoints with the specified `task_type` if one is
210+
specified, or all endpoints for all task types if no `task_type` is specified
209211
"""
210212
__path_parts: t.Dict[str, str]
211213
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
@@ -214,6 +216,9 @@ async def get(
214216
"inference_id": _quote(inference_id),
215217
}
216218
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}'
219+
elif task_type not in SKIP_IN_PATH:
220+
__path_parts = {"task_type": _quote(task_type)}
221+
__path = f'/_inference/{__path_parts["task_type"]}/_all'
217222
elif inference_id not in SKIP_IN_PATH:
218223
__path_parts = {"inference_id": _quote(inference_id)}
219224
__path = f'/_inference/{__path_parts["inference_id"]}'

elasticsearch/_async/client/streams.py

Lines changed: 0 additions & 185 deletions
This file was deleted.

elasticsearch/_sync/client/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
from .snapshot import SnapshotClient
7676
from .sql import SqlClient
7777
from .ssl import SslClient
78-
from .streams import StreamsClient
7978
from .synonyms import SynonymsClient
8079
from .tasks import TasksClient
8180
from .text_structure import TextStructureClient
@@ -381,7 +380,6 @@ def __init__(
381380
self.shutdown = ShutdownClient(self)
382381
self.sql = SqlClient(self)
383382
self.ssl = SslClient(self)
384-
self.streams = StreamsClient(self)
385383
self.synonyms = SynonymsClient(self)
386384
self.text_structure = TextStructureClient(self)
387385
self.transform = TransformClient(self)

elasticsearch/_sync/client/inference.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ def get(
204204
205205
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get>`_
206206
207-
:param task_type: The task type
208-
:param inference_id: The inference Id
207+
:param task_type: The task type of the endpoint to return
208+
:param inference_id: The inference Id of the endpoint to return. Using `_all`
209+
or `*` will return all endpoints with the specified `task_type` if one is
210+
specified, or all endpoints for all task types if no `task_type` is specified
209211
"""
210212
__path_parts: t.Dict[str, str]
211213
if task_type not in SKIP_IN_PATH and inference_id not in SKIP_IN_PATH:
@@ -214,6 +216,9 @@ def get(
214216
"inference_id": _quote(inference_id),
215217
}
216218
__path = f'/_inference/{__path_parts["task_type"]}/{__path_parts["inference_id"]}'
219+
elif task_type not in SKIP_IN_PATH:
220+
__path_parts = {"task_type": _quote(task_type)}
221+
__path = f'/_inference/{__path_parts["task_type"]}/_all'
217222
elif inference_id not in SKIP_IN_PATH:
218223
__path_parts = {"inference_id": _quote(inference_id)}
219224
__path = f'/_inference/{__path_parts["inference_id"]}'

elasticsearch/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
# under the License.
1717

1818
__versionstr__ = "9.2.1"
19-
__es_specification_commit__ = "2d0d012abee4769e1b8606ef92a65f7ed5b4303f"
19+
__es_specification_commit__ = "a3b1c72f0409bc84a2397e6382d6c25b9b0f13d4"

elasticsearch/client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
from ._sync.client.snapshot import SnapshotClient as SnapshotClient # noqa: F401
6464
from ._sync.client.sql import SqlClient as SqlClient # noqa: F401
6565
from ._sync.client.ssl import SslClient as SslClient # noqa: F401
66-
from ._sync.client.streams import StreamsClient as StreamsClient # noqa: F401
6766
from ._sync.client.synonyms import SynonymsClient as SynonymsClient # noqa: F401
6867
from ._sync.client.tasks import TasksClient as TasksClient # noqa: F401
6968
from ._sync.client.text_structure import ( # noqa: F401
@@ -118,7 +117,6 @@
118117
"SnapshotClient",
119118
"SqlClient",
120119
"SslClient",
121-
"StreamsClient",
122120
"TasksClient",
123121
"TextStructureClient",
124122
"TransformClient",

elasticsearch/dsl/types.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2676,23 +2676,30 @@ def __init__(
26762676

26772677
class MultiTermLookup(AttrDict[Any]):
26782678
"""
2679-
:arg field: (required) A fields from which to retrieve terms.
2679+
:arg field: A field from which to retrieve terms. It is required if
2680+
`script` is not provided.
2681+
:arg script: A script to calculate terms to aggregate on. It is
2682+
required if `field` is not provided.
26802683
:arg missing: The value to apply to documents that do not have a
26812684
value. By default, documents without a value are ignored.
26822685
"""
26832686

26842687
field: Union[str, InstrumentedField, DefaultType]
2688+
script: Union["Script", Dict[str, Any], DefaultType]
26852689
missing: Union[str, int, float, bool, DefaultType]
26862690

26872691
def __init__(
26882692
self,
26892693
*,
26902694
field: Union[str, InstrumentedField, DefaultType] = DEFAULT,
2695+
script: Union["Script", Dict[str, Any], DefaultType] = DEFAULT,
26912696
missing: Union[str, int, float, bool, DefaultType] = DEFAULT,
26922697
**kwargs: Any,
26932698
):
26942699
if field is not DEFAULT:
26952700
kwargs["field"] = str(field)
2701+
if script is not DEFAULT:
2702+
kwargs["script"] = script
26962703
if missing is not DEFAULT:
26972704
kwargs["missing"] = missing
26982705
super().__init__(kwargs)

0 commit comments

Comments
 (0)