Skip to content

Commit

Permalink
Updated opensearch-py to reflect the latest OpenSearch API spec (2025…
Browse files Browse the repository at this point in the history
…-01-11)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
saimedhi authored and github-actions[bot] committed Jan 11, 2025
1 parent 7336f51 commit 1118961
Show file tree
Hide file tree
Showing 21 changed files with 3,443 additions and 742 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added option to pass custom headers to 'AWSV4SignerAsyncAuth' ([863](https://github.com/opensearch-project/opensearch-py/pull/863))
- Added sync and async sample that uses `search_after` parameter ([859](https://github.com/opensearch-project/opensearch-py/pull/859))
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@9efddb9](https://github.com/opensearch-project/opensearch-api-specification/commit/9efddb985a51ef988d6a37606d043d4d1577baf5)
### Changed
- Small refactor of AWS Signer classes for both sync and async clients ([866](https://github.com/opensearch-project/opensearch-py/pull/866))
- Small refactor to fix overwriting the module files when generating apis ([874](https://github.com/opensearch-project/opensearch-py/pull/874))
Expand Down
36 changes: 14 additions & 22 deletions opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ async def count(
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. This parameter can only be used when the `q` query
string parameter is specified. Valid choices are and, or.
string parameter is specified. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the `q` query
string parameter is specified.
Expand Down Expand Up @@ -855,7 +855,7 @@ async def delete_by_query(
:arg conflicts: What to do if delete by query hits version
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -897,8 +897,7 @@ async def delete_by_query(
:arg search_timeout: Explicit timeout for each search request.
Defaults to no timeout.
:arg search_type: The type of the search operation. Available
options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are
dfs_query_then_fetch, query_then_fetch.
options: `query_then_fetch`, `dfs_query_then_fetch`.
:arg size: Deprecated, use `max_docs` instead.
:arg slices: The number of slices this task should be divided
into. Valid choices are auto.
Expand Down Expand Up @@ -1225,7 +1224,7 @@ async def explain(
parameter can only be used when the `q` query string parameter is
specified.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. Default is _all.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -1651,8 +1650,7 @@ async def msearch(
returned as an integer in the response. Defaults to false, which returns
an object. Default is false.
:arg search_type: Indicates whether global term and document
frequencies should be used when scoring returned documents. Valid
choices are dfs_query_then_fetch, query_then_fetch.
frequencies should be used when scoring returned documents.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg typed_keys: Specifies whether aggregation and suggester
Expand Down Expand Up @@ -1716,8 +1714,7 @@ async def msearch_template(
`hits.total` as an integer. If `false`, it returns `hits.total` as an
object. Default is false.
:arg search_type: The type of the search operation. Available
options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are
dfs_query_then_fetch, query_then_fetch.
options: `query_then_fetch`, `dfs_query_then_fetch`.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg typed_keys: If `true`, the response prefixes aggregation
Expand Down Expand Up @@ -1926,8 +1923,7 @@ async def rank_eval(
are not included in the response.
:arg pretty: Whether to pretty format the returned JSON
response. Default is false.
:arg search_type: Search operation type Valid choices are
dfs_query_then_fetch, query_then_fetch.
:arg search_type: Search operation type
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
Expand All @@ -1950,6 +1946,7 @@ async def rank_eval(
"pretty",
"refresh",
"requests_per_second",
"require_alias",
"scroll",
"slices",
"source",
Expand Down Expand Up @@ -2020,7 +2017,7 @@ async def reindex_rethrottle(
headers: Any = None,
) -> Any:
"""
Changes the number of requests per second for a particular Reindex operation.
Changes the number of requests per second for a particular reindex operation.
:arg task_id: Identifier for the task.
Expand Down Expand Up @@ -2138,8 +2135,6 @@ async def scroll(
Allows to retrieve a large numbers of results from a single search request.
:arg body: The scroll ID if not passed by URL or query
parameter.
:arg scroll_id: The scroll ID for scrolled search
:arg error_trace: Whether to include the stack trace of returned
errors. Default is false.
Expand Down Expand Up @@ -2281,7 +2276,7 @@ async def search(
executing cross-cluster search (CCS) requests. Default is True.
:arg default_operator: The default operator for query string
query: AND or OR. This parameter can only be used when the `q` query
string parameter is specified. Valid choices are and, or.
string parameter is specified. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string. This parameter can only be used when the q query
string parameter is specified.
Expand Down Expand Up @@ -2371,8 +2366,7 @@ async def search(
:arg search_pipeline: Customizable sequence of processing stages
applied to search queries.
:arg search_type: How distributed term frequencies are
calculated for relevance scoring. Valid choices are
dfs_query_then_fetch, query_then_fetch.
calculated for relevance scoring.
:arg seq_no_primary_term: If `true`, returns sequence number and
primary term of the last modification of each hit.
:arg size: Defines the number of hits to return. By default, you
Expand Down Expand Up @@ -2570,8 +2564,7 @@ async def search_template(
specific shard.
:arg scroll: Specifies how long a consistent view of the index
should be maintained for scrolled search.
:arg search_type: The type of the search operation. Valid
choices are dfs_query_then_fetch, query_then_fetch.
:arg search_type: The type of the search operation.
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
:arg typed_keys: If `true`, the response prefixes aggregation
Expand Down Expand Up @@ -2834,7 +2827,7 @@ async def update_by_query(
:arg conflicts: What to do if update by query hits version
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
:arg default_operator: The default operator for query string
query: `AND` or `OR`. Valid choices are and, or.
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
:arg df: Field to use as default where no field prefix is given
in the query string.
:arg error_trace: Whether to include the stack trace of returned
Expand Down Expand Up @@ -2880,8 +2873,7 @@ async def update_by_query(
operation. Default is 100.
:arg search_timeout: Explicit timeout for each search request.
:arg search_type: The type of the search operation. Available
options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are
dfs_query_then_fetch, query_then_fetch.
options: `query_then_fetch`, `dfs_query_then_fetch`.
:arg size: Deprecated, use `max_docs` instead.
:arg slices: The number of slices this task should be divided
into. Valid choices are auto.
Expand Down
Loading

0 comments on commit 1118961

Please sign in to comment.