Skip to content

Commit 71d9f6b

Browse files
Auto-generated API code
1 parent 9ace51b commit 71d9f6b

File tree

5 files changed

+23
-191
lines changed

5 files changed

+23
-191
lines changed

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/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/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)