@@ -1010,9 +1010,9 @@ async def get(self, index, id, doc_type=None, params=None, headers=None):
1010
1010
to include in the response.
1011
1011
:arg preference: Specifies the node or shard the operation
1012
1012
should be performed on. Random by default.
1013
- :arg realtime: Boolean) If true, the request is real-time as
1013
+ :arg realtime: Boolean) If true, the request is real-time as
1014
1014
opposed to near-real-time. Default: True
1015
- :arg refresh: If true, Elasticsearch refreshes the affected
1015
+ :arg refresh: If true, Elasticsearch refreshes the affected
1016
1016
shards to make this operation visible to search. If false, do nothing
1017
1017
with refreshes.
1018
1018
:arg routing: Target the specified primary shard.
@@ -1614,8 +1614,8 @@ async def search(
1614
1614
:arg doc_type: A comma-separated list of document types to
1615
1615
search; leave empty to perform the operation on all types
1616
1616
:arg _source: Indicates which source fields are returned for
1617
- matching documents. These fields are returned in the hits._source
1618
- property of the search response.
1617
+ matching documents. These
1618
+ fields are returned in the hits._source property of the search response.
1619
1619
:arg _source_excludes: A list of fields to exclude from the
1620
1620
returned _source field
1621
1621
:arg _source_includes: A list of fields to extract and return
@@ -1645,19 +1645,22 @@ async def search(
1645
1645
:arg df: The field to use as default where no field prefix is
1646
1646
given in the query string
1647
1647
:arg docvalue_fields: Array of wildcard (*) patterns. The
1648
- request returns doc values for field names matching these patterns in
1649
- the hits.fields property of the response.
1648
+ request returns doc values for field
1649
+ names matching these patterns in the hits.fields property of the
1650
+ response.
1650
1651
:arg expand_wildcards: Whether to expand wildcard expression to
1651
1652
concrete indices that are open, closed or both. Valid choices: open,
1652
1653
closed, hidden, none, all Default: open
1653
1654
:arg explain: If true, returns detailed information about score
1654
1655
computation as part of a hit.
1655
1656
:arg fields: Array of wildcard (*) patterns. The request returns
1656
- values for field names matching these patterns in the hits.fields
1657
- property of the response.
1657
+ values for field names
1658
+ matching these patterns in the hits.fields property of the response.
1658
1659
:arg from_: Starting document offset. By default, you cannot
1659
- page through more than 10,000 hits using the from and size parameters.
1660
- To page through more hits, use the search_after parameter.
1660
+ page through more than 10,000
1661
+ hits using the from and size parameters. To page through more hits, use
1662
+ the
1663
+ search_after parameter.
1661
1664
:arg highlight:
1662
1665
:arg ignore_throttled: Whether specified concrete, expanded or
1663
1666
aliased indices should be ignored when throttled
@@ -1675,13 +1678,15 @@ async def search(
1675
1678
that all shards involved in search should have for this request to be
1676
1679
successful
1677
1680
:arg min_score: Minimum _score for matching documents. Documents
1678
- with a lower _score are not included in the search results.
1681
+ with a lower _score are
1682
+ not included in the search results.
1679
1683
:arg pit: Limits the search to a point in time (PIT). If you
1680
- provide a PIT, you cannot specify an <index> in the request path.
1684
+ provide a PIT, you
1685
+ cannot specify an <index> in the request path.
1681
1686
:arg post_filter:
1682
1687
:arg pre_filter_shard_size: A threshold that enforces a pre-
1683
1688
filter roundtrip to prefilter search shards based on query rewriting if
1684
- the number of shards the search request expands to exceeds the
1689
+ the number of shards the search request expands to exceeds the
1685
1690
threshold. This filter roundtrip can limit the number of shards
1686
1691
significantly if for instance a shard can not match any documents based
1687
1692
on its rewrite method ie. if date filters are mandatory to match but the
@@ -1698,8 +1703,8 @@ async def search(
1698
1703
be rendered as an integer or an object in the rest search response
1699
1704
:arg routing: A comma-separated list of specific routing values
1700
1705
:arg runtime_mappings: Defines one or more runtime fields in the
1701
- search request. These fields take precedence over mapped fields with the
1702
- same name.
1706
+ search request. These fields take
1707
+ precedence over mapped fields with the same name.
1703
1708
:arg script_fields: Retrieve a script evaluation (based on
1704
1709
different fields) for each hit.
1705
1710
:arg scroll: Specify how long a consistent view of the index
@@ -1708,21 +1713,27 @@ async def search(
1708
1713
:arg search_type: Search operation type Valid choices:
1709
1714
query_then_fetch, dfs_query_then_fetch
1710
1715
:arg seq_no_primary_term: If true, returns sequence number and
1711
- primary term of the last modification of each hit. See Optimistic
1712
- concurrency control.
1716
+ primary term of the last modification
1717
+ of each hit. See Optimistic concurrency control.
1713
1718
:arg size: The number of hits to return. By default, you cannot
1714
- page through more than 10,000 hits using the from and size parameters.
1715
- To page through more hits, use the search_after parameter.
1719
+ page through more
1720
+ than 10,000 hits using the from and size parameters. To page through
1721
+ more
1722
+ hits, use the search_after parameter.
1716
1723
:arg slice:
1717
1724
:arg sort:
1718
1725
:arg stats: Stats groups to associate with the search. Each
1719
- group maintains a statistics aggregation for its associated searches.
1720
- You can retrieve these stats using the indices stats API.
1726
+ group maintains a statistics
1727
+ aggregation for its associated searches. You can retrieve these stats
1728
+ using
1729
+ the indices stats API.
1721
1730
:arg stored_fields: List of stored fields to return as part of a
1722
- hit. If no fields are specified, no stored fields are included in the
1723
- response. If this field is specified, the _source parameter defaults to
1724
- false. You can pass _source: true to return both source fields and
1725
- stored fields in the search response.
1731
+ hit. If no fields are specified,
1732
+ no stored fields are included in the response. If this field is
1733
+ specified, the _source
1734
+ parameter defaults to false. You can pass _source: true to return both
1735
+ source fields
1736
+ and stored fields in the search response.
1726
1737
:arg suggest:
1727
1738
:arg suggest_field: Specifies which field to use for
1728
1739
suggestions.
@@ -1732,18 +1743,24 @@ async def search(
1732
1743
:arg suggest_text: The source text for which the suggestions
1733
1744
should be returned.
1734
1745
:arg terminate_after: Maximum number of documents to collect for
1735
- each shard. If a query reaches this limit, Elasticsearch terminates the
1736
- query early. Elasticsearch collects documents before sorting. Defaults
1737
- to 0, which does not terminate query execution early.
1746
+ each shard. If a query reaches this
1747
+ limit, Elasticsearch terminates the query early. Elasticsearch collects
1748
+ documents
1749
+ before sorting. Defaults to 0, which does not terminate query execution
1750
+ early.
1738
1751
:arg timeout: Specifies the period of time to wait for a
1739
- response from each shard. If no response is received before the timeout
1740
- expires, the request fails and returns an error. Defaults to no timeout.
1752
+ response from each shard. If no response
1753
+ is received before the timeout expires, the request fails and returns an
1754
+ error.
1755
+ Defaults to no timeout.
1741
1756
:arg track_scores: If true, calculate and return document
1742
1757
scores, even if the scores are not used for sorting.
1743
1758
:arg track_total_hits: Number of hits matching the query to
1744
- count accurately. If true, the exact number of hits is returned at the
1745
- cost of some performance. If false, the response does not include the
1746
- total number of hits matching the query. Defaults to 10,000 hits.
1759
+ count accurately. If true, the exact
1760
+ number of hits is returned at the cost of some performance. If false,
1761
+ the
1762
+ response does not include the total number of hits matching the query.
1763
+ Defaults to 10,000 hits.
1747
1764
:arg typed_keys: Specify whether aggregation and suggester names
1748
1765
should be prefixed by their respective types in the response
1749
1766
:arg version: If true, returns document version as part of a
@@ -1945,6 +1962,7 @@ async def termvectors(
1945
1962
"scripted_upsert" ,
1946
1963
"upsert" ,
1947
1964
],
1965
+ body_required = True ,
1948
1966
)
1949
1967
async def update (self , index , id , body , doc_type = None , params = None , headers = None ):
1950
1968
"""
@@ -1958,13 +1976,15 @@ async def update(self, index, id, body, doc_type=None, params=None, headers=None
1958
1976
partial `doc`
1959
1977
:arg doc_type: The type of the document
1960
1978
:arg _source: Set to false to disable source retrieval. You can
1961
- also specify a comma-separated list of the fields you want to retrieve.
1979
+ also specify a comma-separated
1980
+ list of the fields you want to retrieve.
1962
1981
:arg _source_excludes: Specify the source fields you want to
1963
1982
exclude.
1964
1983
:arg _source_includes: Specify the source fields you want to
1965
1984
retrieve.
1966
1985
:arg detect_noop: Set to false to disable setting 'result' in
1967
- the response to 'noop' if no change to the document occurred.
1986
+ the response
1987
+ to 'noop' if no change to the document occurred.
1968
1988
:arg doc: A partial update to an existing document.
1969
1989
:arg doc_as_upsert: Set to true to use the contents of 'doc' as
1970
1990
the value of 'upsert'
@@ -1974,10 +1994,11 @@ async def update(self, index, id, body, doc_type=None, params=None, headers=None
1974
1994
this sequence number.
1975
1995
:arg lang: The script language. Default: painless
1976
1996
:arg refresh: If 'true', Elasticsearch refreshes the affected
1977
- shards to make this operation visible to search, if 'wait_for' then wait
1978
- for a refresh to make this operation visible to search, if 'false' do
1979
- nothing with refreshes. Valid choices: true, false, wait_for Default:
1980
- false
1997
+ shards to make this operation
1998
+ visible to search, if 'wait_for' then wait for a refresh to make this
1999
+ operation
2000
+ visible to search, if 'false' do nothing with refreshes. Valid choices:
2001
+ true, false, wait_for Default: false
1981
2002
:arg require_alias: If true, the destination must be an index
1982
2003
alias.
1983
2004
:arg retry_on_conflict: Specify how many times should the
@@ -1988,15 +2009,18 @@ async def update(self, index, id, body, doc_type=None, params=None, headers=None
1988
2009
:arg scripted_upsert: Set to true to execute the script whether
1989
2010
or not the document exists.
1990
2011
:arg timeout: Period to wait for dynamic mapping updates and
1991
- active shards. This guarantees Elasticsearch waits for at least the
1992
- timeout before failing. The actual wait time could be longer,
1993
- particularly when multiple waits occur. Default: 1m
2012
+ active shards.
2013
+ This guarantees Elasticsearch waits for at least the timeout before
2014
+ failing.
2015
+ The actual wait time could be longer, particularly when multiple waits
2016
+ occur. Default: 1m
1994
2017
:arg upsert: If the document does not already exist, the
1995
- contents of 'upsert' are inserted as a new document. If the document
1996
- exists, the 'script' is executed.
2018
+ contents of 'upsert' are inserted as a
2019
+ new document. If the document exists, the 'script' is executed.
1997
2020
:arg wait_for_active_shards: The number of shard copies that
1998
- must be active before proceeding with the operations. Set to 'all' or
1999
- any positive integer up to the total number of shards in the index
2021
+ must be active before proceeding with the operations.
2022
+ Set to 'all' or any positive integer up to the total number of shards in
2023
+ the index
2000
2024
(number_of_replicas+1). Defaults to 1 meaning the primary shard.
2001
2025
Default: 1
2002
2026
"""
0 commit comments