Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated opensearch-py to reflect the latest OpenSearch API spec #864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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@b95d90e](https://github.com/opensearch-project/opensearch-api-specification/commit/b95d90eafd01c0bfb9ad6c8dae4f02473a9900c0)
### 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
40 changes: 14 additions & 26 deletions opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,16 +667,12 @@ 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.
:arg error_trace: Whether to include the stack trace of returned
errors. Default is false.
:arg expand_wildcards: Type of index that wildcard patterns can
match. If the request can target data streams, this argument determines
whether wildcard expressions match hidden data streams. Supports comma-
separated values, such as `open,hidden`.
:arg filter_path: Used to reduce the response. This parameter
takes a comma-separated list of filters. It supports using wildcards to
match any field or part of a field’s name. You can also exclude fields
Expand Down Expand Up @@ -855,7 +851,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 +893,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 +1220,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 +1646,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 +1710,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 +1919,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 +1942,7 @@ async def rank_eval(
"pretty",
"refresh",
"requests_per_second",
"require_alias",
"scroll",
"slices",
"source",
Expand Down Expand Up @@ -2020,7 +2013,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 +2131,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 +2272,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 +2362,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 +2560,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 +2823,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 +2869,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
Loading