Skip to content

Commit 8259464

Browse files
saimedhigithub-actions[bot]
authored andcommitted
Updated opensearch-py to reflect the latest OpenSearch API spec (2025-03-21)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 6ab1a7f commit 8259464

33 files changed

+5729
-1704
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
- Added option to pass custom headers to 'AWSV4SignerAsyncAuth' ([863](https://github.com/opensearch-project/opensearch-py/pull/863))
77
- Added sync and async sample that uses `search_after` parameter ([859](https://github.com/opensearch-project/opensearch-py/pull/859))
88
### Updated APIs
9+
- Updated opensearch-py APIs to reflect [opensearch-api-specification@7be2584](https://github.com/opensearch-project/opensearch-api-specification/commit/7be2584b82c48e52b23c4c514be2fbb8f71977ce)
910
### Changed
1011
- Small refactor of AWS Signer classes for both sync and async clients ([866](https://github.com/opensearch-project/opensearch-py/pull/866))
1112
- Small refactor to fix overwriting the module files when generating apis ([874](https://github.com/opensearch-project/opensearch-py/pull/874))

opensearchpy/_async/client/__init__.py

+14-26
Original file line numberDiff line numberDiff line change
@@ -667,16 +667,12 @@ async def count(
667667
specified.
668668
:arg default_operator: The default operator for query string
669669
query: `AND` or `OR`. This parameter can only be used when the `q` query
670-
string parameter is specified. Valid choices are and, or.
670+
string parameter is specified. Valid choices are and, AND, or, OR.
671671
:arg df: Field to use as default where no field prefix is given
672672
in the query string. This parameter can only be used when the `q` query
673673
string parameter is specified.
674674
:arg error_trace: Whether to include the stack trace of returned
675675
errors. Default is false.
676-
:arg expand_wildcards: Type of index that wildcard patterns can
677-
match. If the request can target data streams, this argument determines
678-
whether wildcard expressions match hidden data streams. Supports comma-
679-
separated values, such as `open,hidden`.
680676
:arg filter_path: Used to reduce the response. This parameter
681677
takes a comma-separated list of filters. It supports using wildcards to
682678
match any field or part of a field’s name. You can also exclude fields
@@ -855,7 +851,7 @@ async def delete_by_query(
855851
:arg conflicts: What to do if delete by query hits version
856852
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
857853
:arg default_operator: The default operator for query string
858-
query: `AND` or `OR`. Valid choices are and, or.
854+
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
859855
:arg df: Field to use as default where no field prefix is given
860856
in the query string.
861857
:arg error_trace: Whether to include the stack trace of returned
@@ -897,8 +893,7 @@ async def delete_by_query(
897893
:arg search_timeout: Explicit timeout for each search request.
898894
Defaults to no timeout.
899895
:arg search_type: The type of the search operation. Available
900-
options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are
901-
dfs_query_then_fetch, query_then_fetch.
896+
options: `query_then_fetch`, `dfs_query_then_fetch`.
902897
:arg size: Deprecated, use `max_docs` instead.
903898
:arg slices: The number of slices this task should be divided
904899
into. Valid choices are auto.
@@ -1225,7 +1220,7 @@ async def explain(
12251220
parameter can only be used when the `q` query string parameter is
12261221
specified.
12271222
:arg default_operator: The default operator for query string
1228-
query: `AND` or `OR`. Valid choices are and, or.
1223+
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
12291224
:arg df: Field to use as default where no field prefix is given
12301225
in the query string. Default is _all.
12311226
:arg error_trace: Whether to include the stack trace of returned
@@ -1651,8 +1646,7 @@ async def msearch(
16511646
returned as an integer in the response. Defaults to false, which returns
16521647
an object. Default is false.
16531648
:arg search_type: Indicates whether global term and document
1654-
frequencies should be used when scoring returned documents. Valid
1655-
choices are dfs_query_then_fetch, query_then_fetch.
1649+
frequencies should be used when scoring returned documents.
16561650
:arg source: The URL-encoded request definition. Useful for
16571651
libraries that do not accept a request body for non-POST requests.
16581652
:arg typed_keys: Specifies whether aggregation and suggester
@@ -1716,8 +1710,7 @@ async def msearch_template(
17161710
`hits.total` as an integer. If `false`, it returns `hits.total` as an
17171711
object. Default is false.
17181712
:arg search_type: The type of the search operation. Available
1719-
options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are
1720-
dfs_query_then_fetch, query_then_fetch.
1713+
options: `query_then_fetch`, `dfs_query_then_fetch`.
17211714
:arg source: The URL-encoded request definition. Useful for
17221715
libraries that do not accept a request body for non-POST requests.
17231716
:arg typed_keys: If `true`, the response prefixes aggregation
@@ -1926,8 +1919,7 @@ async def rank_eval(
19261919
are not included in the response.
19271920
:arg pretty: Whether to pretty format the returned JSON
19281921
response. Default is false.
1929-
:arg search_type: Search operation type Valid choices are
1930-
dfs_query_then_fetch, query_then_fetch.
1922+
:arg search_type: Search operation type
19311923
:arg source: The URL-encoded request definition. Useful for
19321924
libraries that do not accept a request body for non-POST requests.
19331925
"""
@@ -1950,6 +1942,7 @@ async def rank_eval(
19501942
"pretty",
19511943
"refresh",
19521944
"requests_per_second",
1945+
"require_alias",
19531946
"scroll",
19541947
"slices",
19551948
"source",
@@ -2020,7 +2013,7 @@ async def reindex_rethrottle(
20202013
headers: Any = None,
20212014
) -> Any:
20222015
"""
2023-
Changes the number of requests per second for a particular Reindex operation.
2016+
Changes the number of requests per second for a particular reindex operation.
20242017
20252018
20262019
:arg task_id: Identifier for the task.
@@ -2138,8 +2131,6 @@ async def scroll(
21382131
Allows to retrieve a large numbers of results from a single search request.
21392132
21402133
2141-
:arg body: The scroll ID if not passed by URL or query
2142-
parameter.
21432134
:arg scroll_id: The scroll ID for scrolled search
21442135
:arg error_trace: Whether to include the stack trace of returned
21452136
errors. Default is false.
@@ -2281,7 +2272,7 @@ async def search(
22812272
executing cross-cluster search (CCS) requests. Default is True.
22822273
:arg default_operator: The default operator for query string
22832274
query: AND or OR. This parameter can only be used when the `q` query
2284-
string parameter is specified. Valid choices are and, or.
2275+
string parameter is specified. Valid choices are and, AND, or, OR.
22852276
:arg df: Field to use as default where no field prefix is given
22862277
in the query string. This parameter can only be used when the q query
22872278
string parameter is specified.
@@ -2371,8 +2362,7 @@ async def search(
23712362
:arg search_pipeline: Customizable sequence of processing stages
23722363
applied to search queries.
23732364
:arg search_type: How distributed term frequencies are
2374-
calculated for relevance scoring. Valid choices are
2375-
dfs_query_then_fetch, query_then_fetch.
2365+
calculated for relevance scoring.
23762366
:arg seq_no_primary_term: If `true`, returns sequence number and
23772367
primary term of the last modification of each hit.
23782368
:arg size: Defines the number of hits to return. By default, you
@@ -2570,8 +2560,7 @@ async def search_template(
25702560
specific shard.
25712561
:arg scroll: Specifies how long a consistent view of the index
25722562
should be maintained for scrolled search.
2573-
:arg search_type: The type of the search operation. Valid
2574-
choices are dfs_query_then_fetch, query_then_fetch.
2563+
:arg search_type: The type of the search operation.
25752564
:arg source: The URL-encoded request definition. Useful for
25762565
libraries that do not accept a request body for non-POST requests.
25772566
:arg typed_keys: If `true`, the response prefixes aggregation
@@ -2834,7 +2823,7 @@ async def update_by_query(
28342823
:arg conflicts: What to do if update by query hits version
28352824
conflicts: `abort` or `proceed`. Valid choices are abort, proceed.
28362825
:arg default_operator: The default operator for query string
2837-
query: `AND` or `OR`. Valid choices are and, or.
2826+
query: `AND` or `OR`. Valid choices are and, AND, or, OR.
28382827
:arg df: Field to use as default where no field prefix is given
28392828
in the query string.
28402829
:arg error_trace: Whether to include the stack trace of returned
@@ -2880,8 +2869,7 @@ async def update_by_query(
28802869
operation. Default is 100.
28812870
:arg search_timeout: Explicit timeout for each search request.
28822871
:arg search_type: The type of the search operation. Available
2883-
options: `query_then_fetch`, `dfs_query_then_fetch`. Valid choices are
2884-
dfs_query_then_fetch, query_then_fetch.
2872+
options: `query_then_fetch`, `dfs_query_then_fetch`.
28852873
:arg size: Deprecated, use `max_docs` instead.
28862874
:arg slices: The number of slices this task should be divided
28872875
into. Valid choices are auto.

0 commit comments

Comments
 (0)