Skip to content

Commit

Permalink
Updated opensearch-py to reflect the latest OpenSearch API spec (2024…
Browse files Browse the repository at this point in the history
…-07-15) (#775)

Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and saimedhi authored Jul 15, 2024
1 parent a380e70 commit ea0a718
Show file tree
Hide file tree
Showing 17 changed files with 161 additions and 160 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Fixed
- Fixed Search helper to ensure proper retention of the _collapse attribute in chained operations. ([#771](https://github.com/opensearch-project/opensearch-py/pull/771))
### Updated APIs
- Updated opensearch-py APIs to reflect [opensearch-api-specification@0b033a9](https://github.com/opensearch-project/opensearch-api-specification/commit/0b033a92cac4cb20ec3fb51350c139afc753b089)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@d5ca873](https://github.com/opensearch-project/opensearch-api-specification/commit/d5ca873d20ff54be16ec48e7bd629cda7c4a6332)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@7452827](https://github.com/opensearch-project/opensearch-api-specification/commit/745282767026703ea27967d2705633c3e2661c97)
- Updated opensearch-py APIs to reflect [opensearch-api-specification@f2afd71](https://github.com/opensearch-project/opensearch-api-specification/commit/f2afd7171406c7477fbd644d74087bb0e2948c75)
Expand Down
62 changes: 31 additions & 31 deletions opensearchpy/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ async def create(
control.The specified version must match the current version of the
document for the request to succeed.
:arg version_type: Specific version type: `external`,
`external_gte`. Valid choices are internal, external, external_gte,
force.
`external_gte`. Valid choices are external, external_gte, force,
internal.
:arg wait_for_active_shards: The number of shard copies that
must be active before proceeding with the operation.Set to `all` or any
positive integer up to the total number of shards in the index
Expand Down Expand Up @@ -463,8 +463,8 @@ async def index(
control.The specified version must match the current version of the
document for the request to succeed.
:arg version_type: Specific version type: `external`,
`external_gte`. Valid choices are internal, external, external_gte,
force.
`external_gte`. Valid choices are external, external_gte, force,
internal.
:arg wait_for_active_shards: The number of shard copies that
must be active before proceeding with the operation.Set to all or any
positive integer up to the total number of shards in the index
Expand Down Expand Up @@ -658,8 +658,8 @@ async def count(
: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`. Valid choices are all, open,
closed, hidden, none.
separated values, such as `open,hidden`. Valid choices are all, closed,
hidden, none, open.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg human: Whether to return human readable values for
Expand Down Expand Up @@ -746,8 +746,8 @@ async def delete(
control.The specified version must match the current version of the
document for the request to succeed.
:arg version_type: Specific version type: `external`,
`external_gte`. Valid choices are internal, external, external_gte,
force.
`external_gte`. Valid choices are external, external_gte, force,
internal.
:arg wait_for_active_shards: The number of shard copies that
must be active before proceeding with the operation.Set to `all` or any
positive integer up to the total number of shards in the index
Expand Down Expand Up @@ -875,7 +875,7 @@ async def delete_by_query(
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
query_then_fetch, dfs_query_then_fetch.
dfs_query_then_fetch, query_then_fetch.
:arg size: Deprecated, please use `max_docs` instead.
:arg slices: The number of slices this task should be divided
into. Valid choices are auto.
Expand Down Expand Up @@ -1066,8 +1066,8 @@ async def exists(
control.The specified version must match the current version of the
document for the request to succeed.
:arg version_type: Specific version type: `external`,
`external_gte`. Valid choices are internal, external, external_gte,
force.
`external_gte`. Valid choices are external, external_gte, force,
internal.
"""
for param in (index, id):
if param in SKIP_IN_PATH:
Expand Down Expand Up @@ -1134,8 +1134,8 @@ async def exists_source(
control.The specified version must match the current version of the
document for the request to succeed.
:arg version_type: Specific version type: `external`,
`external_gte`. Valid choices are internal, external, external_gte,
force.
`external_gte`. Valid choices are external, external_gte, force,
internal.
"""
for param in (index, id):
if param in SKIP_IN_PATH:
Expand Down Expand Up @@ -1266,8 +1266,8 @@ async def field_caps(
: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`. Valid choices are all, open,
closed, hidden, none.
separated values, such as `open,hidden`. Valid choices are all, closed,
hidden, none, open.
:arg fields: Comma-separated list of fields to retrieve
capabilities for. Wildcard (`*`) expressions are supported.
:arg filter_path: Comma-separated list of filters used to reduce
Expand Down Expand Up @@ -1353,7 +1353,7 @@ async def get(
The specified version must match the current version of the document for
the request to succeed.
:arg version_type: Specific version type: internal, external,
external_gte. Valid choices are internal, external, external_gte, force.
external_gte. Valid choices are external, external_gte, force, internal.
"""
for param in (index, id):
if param in SKIP_IN_PATH:
Expand Down Expand Up @@ -1463,7 +1463,7 @@ async def get_source(
The specified version must match the current version of the document for
the request to succeed.
:arg version_type: Specific version type: internal, external,
external_gte. Valid choices are internal, external, external_gte, force.
external_gte. Valid choices are external, external_gte, force, internal.
"""
for param in (index, id):
if param in SKIP_IN_PATH:
Expand Down Expand Up @@ -1606,7 +1606,7 @@ async def msearch(
Default is false.
:arg search_type: Indicates whether global term and document
frequencies should be used when scoring returned documents. Valid
choices are query_then_fetch, dfs_query_then_fetch.
choices are dfs_query_then_fetch, 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: Specifies whether aggregation and suggester
Expand Down Expand Up @@ -1669,7 +1669,7 @@ async def msearch_template(
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
query_then_fetch, dfs_query_then_fetch.
dfs_query_then_fetch, 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 @@ -1757,7 +1757,7 @@ async def mtermvectors(
:arg version: If `true`, returns the document version as part of
a hit.
:arg version_type: Specific version type. Valid choices are
internal, external, external_gte, force.
external, external_gte, force, internal.
"""
path = _make_path(index, "_mtermvectors")

Expand Down Expand Up @@ -1864,7 +1864,7 @@ async def rank_eval(
errors.
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices are all,
open, closed, hidden, none.
closed, hidden, none, open.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg human: Whether to return human readable values for
Expand Down Expand Up @@ -2229,8 +2229,8 @@ async def search(
: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`. Valid choices are all, open,
closed, hidden, none.
separated values, such as `open,hidden`. Valid choices are all, closed,
hidden, none, open.
:arg explain: If `true`, returns detailed information about
score computation as part of a hit.
:arg filter_path: Comma-separated list of filters used to reduce
Expand Down Expand Up @@ -2307,8 +2307,8 @@ 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 query_then_fetch,
dfs_query_then_fetch.
calculated for relevance scoring. Valid choices are
dfs_query_then_fetch, query_then_fetch.
: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 All @@ -2329,7 +2329,7 @@ async def search(
suggestions.
:arg suggest_mode: Specifies the suggest mode.This parameter can
only be used when the `suggest_field` and `suggest_text` query string
parameters are specified. Valid choices are missing, popular, always.
parameters are specified. Valid choices are always, missing, popular.
:arg suggest_size: Number of suggestions to return.This
parameter can only be used when the `suggest_field` and `suggest_text`
query string parameters are specified.
Expand Down Expand Up @@ -2502,7 +2502,7 @@ async def search_template(
:arg scroll: Specifies how long a consistent view of the
indexshould be maintained for scrolled search.
:arg search_type: The type of the search operation. Valid
choices are query_then_fetch, dfs_query_then_fetch.
choices are dfs_query_then_fetch, 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 @@ -2588,7 +2588,7 @@ async def termvectors(
:arg version: If `true`, returns the document version as part of
a hit.
:arg version_type: Specific version type. Valid choices are
internal, external, external_gte, force.
external, external_gte, force, internal.
"""
if index in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'index'.")
Expand Down Expand Up @@ -2656,7 +2656,7 @@ async def update(
:arg refresh: If 'true', OpenSearch refreshes the affected
shards to make this operationvisible to search, if 'wait_for' then wait
for a refresh to make this operationvisible to search, if 'false' do
nothing with refreshes. Valid choices are true, false, wait_for.
nothing with refreshes. Valid choices are false, true, wait_for.
:arg require_alias: If true, the destination must be an index
alias. Default is false.
:arg retry_on_conflict: Specify how many times should the
Expand Down Expand Up @@ -2805,7 +2805,7 @@ async def update_by_query(
: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
query_then_fetch, dfs_query_then_fetch.
dfs_query_then_fetch, query_then_fetch.
:arg size: Deprecated, please use `max_docs` instead.
:arg slices: The number of slices this task should be divided
into. Valid choices are auto.
Expand Down Expand Up @@ -2965,7 +2965,7 @@ async def create_pit(
errors.
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices are all,
open, closed, hidden, none.
closed, hidden, none, open.
:arg filter_path: Comma-separated list of filters used to reduce
the response.
:arg human: Whether to return human readable values for
Expand Down
Loading

0 comments on commit ea0a718

Please sign in to comment.