Skip to content

Commit

Permalink
Auto-generated API code
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed May 18, 2024
1 parent f01a2cd commit 8a3de4a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
7 changes: 7 additions & 0 deletions elasticsearch/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3638,6 +3638,7 @@ async def scroll(
"query",
"rank",
"rescore",
"retriever",
"runtime_mappings",
"script_fields",
"search_after",
Expand Down Expand Up @@ -3719,6 +3720,7 @@ async def search(
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
retriever: t.Optional[t.Mapping[str, t.Any]] = None,
routing: t.Optional[str] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
Expand Down Expand Up @@ -3878,6 +3880,9 @@ async def search(
example 100 - 500) documents returned by the `query` and `post_filter` phases.
:param rest_total_hits_as_int: Indicates whether `hits.total` should be rendered
as an integer or an object in the rest search response.
:param retriever: A retriever is a specification to describe top documents returned
from a search. A retriever replaces other elements of the search API that
also return top documents such as query and knn.
:param routing: Custom value used to route operations to a specific shard.
:param runtime_mappings: Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
Expand Down Expand Up @@ -4074,6 +4079,8 @@ async def search(
__body["rank"] = rank
if rescore is not None:
__body["rescore"] = rescore
if retriever is not None:
__body["retriever"] = retriever
if runtime_mappings is not None:
__body["runtime_mappings"] = runtime_mappings
if script_fields is not None:
Expand Down
4 changes: 0 additions & 4 deletions elasticsearch/_async/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ async def put_component_template(
*,
name: str,
template: t.Optional[t.Mapping[str, t.Any]] = None,
cause: t.Optional[str] = None,
create: t.Optional[bool] = None,
deprecated: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
Expand Down Expand Up @@ -699,7 +698,6 @@ async def put_component_template(
update settings API.
:param template: The template to be applied which includes mappings, settings,
or aliases configuration.
:param cause:
:param create: If `true`, this request cannot replace or update existing component
templates.
:param deprecated: Marks this index template as deprecated. When creating or
Expand All @@ -724,8 +722,6 @@ async def put_component_template(
__path = f'/_component_template/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
if cause is not None:
__query["cause"] = cause
if create is not None:
__query["create"] = create
if error_trace is not None:
Expand Down
7 changes: 7 additions & 0 deletions elasticsearch/_sync/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3636,6 +3636,7 @@ def scroll(
"query",
"rank",
"rescore",
"retriever",
"runtime_mappings",
"script_fields",
"search_after",
Expand Down Expand Up @@ -3717,6 +3718,7 @@ def search(
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
] = None,
rest_total_hits_as_int: t.Optional[bool] = None,
retriever: t.Optional[t.Mapping[str, t.Any]] = None,
routing: t.Optional[str] = None,
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
Expand Down Expand Up @@ -3876,6 +3878,9 @@ def search(
example 100 - 500) documents returned by the `query` and `post_filter` phases.
:param rest_total_hits_as_int: Indicates whether `hits.total` should be rendered
as an integer or an object in the rest search response.
:param retriever: A retriever is a specification to describe top documents returned
from a search. A retriever replaces other elements of the search API that
also return top documents such as query and knn.
:param routing: Custom value used to route operations to a specific shard.
:param runtime_mappings: Defines one or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
Expand Down Expand Up @@ -4072,6 +4077,8 @@ def search(
__body["rank"] = rank
if rescore is not None:
__body["rescore"] = rescore
if retriever is not None:
__body["retriever"] = retriever
if runtime_mappings is not None:
__body["runtime_mappings"] = runtime_mappings
if script_fields is not None:
Expand Down
4 changes: 0 additions & 4 deletions elasticsearch/_sync/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ def put_component_template(
*,
name: str,
template: t.Optional[t.Mapping[str, t.Any]] = None,
cause: t.Optional[str] = None,
create: t.Optional[bool] = None,
deprecated: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
Expand Down Expand Up @@ -699,7 +698,6 @@ def put_component_template(
update settings API.
:param template: The template to be applied which includes mappings, settings,
or aliases configuration.
:param cause:
:param create: If `true`, this request cannot replace or update existing component
templates.
:param deprecated: Marks this index template as deprecated. When creating or
Expand All @@ -724,8 +722,6 @@ def put_component_template(
__path = f'/_component_template/{__path_parts["name"]}'
__query: t.Dict[str, t.Any] = {}
__body: t.Dict[str, t.Any] = body if body is not None else {}
if cause is not None:
__query["cause"] = cause
if create is not None:
__query["create"] = create
if error_trace is not None:
Expand Down

0 comments on commit 8a3de4a

Please sign in to comment.