@@ -471,15 +471,15 @@ async def bulk(self, body, index=None, doc_type=None, params=None, headers=None)
471
471
)
472
472
473
473
@query_params ()
474
- async def clear_scroll (self , body = None , scroll_id = None , params = None , headers = None ):
474
+ async def clear_scroll (self , scroll_id = None , body = None , params = None , headers = None ):
475
475
"""
476
476
Explicitly clears the search context for a scroll.
477
477
478
478
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/clear-scroll-api.html>`_
479
479
480
+ :arg scroll_id: A comma-separated list of scroll IDs to clear
480
481
:arg body: A comma-separated list of scroll IDs to clear if none
481
482
was specified via the scroll_id parameter
482
- :arg scroll_id: A comma-separated list of scroll IDs to clear
483
483
"""
484
484
if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH :
485
485
raise ValueError ("You need to supply scroll_id or body." )
@@ -509,15 +509,13 @@ async def clear_scroll(self, body=None, scroll_id=None, params=None, headers=Non
509
509
"terminate_after" ,
510
510
)
511
511
async def count (
512
- self , body = None , index = None , doc_type = None , params = None , headers = None
512
+ self , index = None , doc_type = None , body = None , params = None , headers = None
513
513
):
514
514
"""
515
515
Returns number of documents matching a query.
516
516
517
517
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-count.html>`_
518
518
519
- :arg body: A query to restrict the results specified with the
520
- Query DSL (optional)
521
519
:arg index: A comma-separated list of indices to restrict the
522
520
results
523
521
:arg doc_type: A comma-separated list of types to restrict the
@@ -549,6 +547,8 @@ async def count(
549
547
:arg routing: A comma-separated list of specific routing values
550
548
:arg terminate_after: The maximum count for each shard, upon
551
549
reaching which the query execution will terminate early
550
+ :arg body: A query to restrict the results specified with the
551
+ Query DSL (optional)
552
552
"""
553
553
return await self .transport .perform_request (
554
554
"POST" ,
@@ -899,7 +899,7 @@ async def exists_source(self, index, id, doc_type=None, params=None, headers=Non
899
899
"stored_fields" ,
900
900
)
901
901
async def explain (
902
- self , index , id , body = None , doc_type = None , params = None , headers = None
902
+ self , index , id , doc_type = None , body = None , params = None , headers = None
903
903
):
904
904
"""
905
905
Returns information about why a specific matches (or doesn't match) a query.
@@ -908,7 +908,6 @@ async def explain(
908
908
909
909
:arg index: The name of the index
910
910
:arg id: The document ID
911
- :arg body: The query definition using the Query DSL
912
911
:arg doc_type: The type of the document
913
912
:arg _source: True or false to return the _source field or not,
914
913
or a list of fields to return
@@ -931,6 +930,7 @@ async def explain(
931
930
:arg routing: Specific routing value
932
931
:arg stored_fields: A comma-separated list of stored fields to
933
932
return in the response
933
+ :arg body: The query definition using the Query DSL
934
934
"""
935
935
for param in (index , id ):
936
936
if param in SKIP_IN_PATH :
@@ -952,14 +952,13 @@ async def explain(
952
952
"ignore_unavailable" ,
953
953
"include_unmapped" ,
954
954
)
955
- async def field_caps (self , body = None , index = None , params = None , headers = None ):
955
+ async def field_caps (self , index = None , body = None , params = None , headers = None ):
956
956
"""
957
957
Returns the information about the capabilities of fields among multiple
958
958
indices.
959
959
960
960
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-field-caps.html>`_
961
961
962
- :arg body: An index filter specified with the Query DSL
963
962
:arg index: A comma-separated list of index names; use `_all` or
964
963
empty string to perform the operation on all indices
965
964
:arg allow_no_indices: Whether to ignore if a wildcard indices
@@ -973,6 +972,7 @@ async def field_caps(self, body=None, index=None, params=None, headers=None):
973
972
should be ignored when unavailable (missing or closed)
974
973
:arg include_unmapped: Indicates whether unmapped fields should
975
974
be included in the response.
975
+ :arg body: An index filter specified with the Query DSL
976
976
"""
977
977
return await self .transport .perform_request (
978
978
"POST" ,
@@ -1266,16 +1266,13 @@ async def msearch_template(
1266
1266
"version_type" ,
1267
1267
)
1268
1268
async def mtermvectors (
1269
- self , body = None , index = None , doc_type = None , params = None , headers = None
1269
+ self , index = None , doc_type = None , body = None , params = None , headers = None
1270
1270
):
1271
1271
"""
1272
1272
Returns multiple termvectors in one request.
1273
1273
1274
1274
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-multi-termvectors.html>`_
1275
1275
1276
- :arg body: Define ids, documents, parameters or a list of
1277
- parameters per document here. You must at least provide a list of
1278
- document ids. See documentation.
1279
1276
:arg index: The index in which the document resides.
1280
1277
:arg doc_type: The type of the document.
1281
1278
:arg field_statistics: Specifies if document count, sum of
@@ -1309,6 +1306,9 @@ async def mtermvectors(
1309
1306
:arg version: Explicit version number for concurrency control
1310
1307
:arg version_type: Specific version type Valid choices:
1311
1308
internal, external, external_gte, force
1309
+ :arg body: Define ids, documents, parameters or a list of
1310
+ parameters per document here. You must at least provide a list of
1311
+ document ids. See documentation.
1312
1312
"""
1313
1313
if doc_type in SKIP_IN_PATH :
1314
1314
path = _make_path (index , "_mtermvectors" )
@@ -1328,7 +1328,7 @@ async def put_script(self, id, body, context=None, params=None, headers=None):
1328
1328
1329
1329
:arg id: Script ID
1330
1330
:arg body: The document
1331
- :arg context: Context name to compile script against
1331
+ :arg context: Script context
1332
1332
:arg master_timeout: Specify timeout for connection to master
1333
1333
:arg timeout: Explicit operation timeout
1334
1334
"""
@@ -1455,15 +1455,15 @@ async def reindex_rethrottle(self, task_id, params=None, headers=None):
1455
1455
1456
1456
@query_params ()
1457
1457
async def render_search_template (
1458
- self , body = None , id = None , params = None , headers = None
1458
+ self , id = None , body = None , params = None , headers = None
1459
1459
):
1460
1460
"""
1461
1461
Allows to use the Mustache language to pre-render a search definition.
1462
1462
1463
1463
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/render-search-template-api.html>`_
1464
1464
1465
- :arg body: The search definition template and its params
1466
1465
:arg id: The id of the stored search template
1466
+ :arg body: The search definition template and its params
1467
1467
"""
1468
1468
return await self .transport .perform_request (
1469
1469
"POST" ,
@@ -1496,19 +1496,19 @@ async def scripts_painless_execute(self, body=None, params=None, headers=None):
1496
1496
)
1497
1497
1498
1498
@query_params ("rest_total_hits_as_int" , "scroll" )
1499
- async def scroll (self , body = None , scroll_id = None , params = None , headers = None ):
1499
+ async def scroll (self , scroll_id = None , body = None , params = None , headers = None ):
1500
1500
"""
1501
1501
Allows to retrieve a large numbers of results from a single search request.
1502
1502
1503
1503
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-request-body.html#request-body-search-scroll>`_
1504
1504
1505
- :arg body: The scroll ID if not passed by URL or query
1506
- parameter.
1507
- :arg scroll_id: The scroll ID for scrolled search
1505
+ :arg scroll_id: The scroll ID
1508
1506
:arg rest_total_hits_as_int: Indicates whether hits.total should
1509
1507
be rendered as an integer or an object in the rest search response
1510
1508
:arg scroll: Specify how long a consistent view of the index
1511
1509
should be maintained for scrolled search
1510
+ :arg body: The scroll ID if not passed by URL or query
1511
+ parameter.
1512
1512
"""
1513
1513
if scroll_id in SKIP_IN_PATH and body in SKIP_IN_PATH :
1514
1514
raise ValueError ("You need to supply scroll_id or body." )
@@ -1567,14 +1567,13 @@ async def scroll(self, body=None, scroll_id=None, params=None, headers=None):
1567
1567
"version" ,
1568
1568
)
1569
1569
async def search (
1570
- self , body = None , index = None , doc_type = None , params = None , headers = None
1570
+ self , index = None , doc_type = None , body = None , params = None , headers = None
1571
1571
):
1572
1572
"""
1573
1573
Returns results matching a query.
1574
1574
1575
1575
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/search-search.html>`_
1576
1576
1577
- :arg body: The search definition using the Query DSL
1578
1577
:arg index: A comma-separated list of index names to search; use
1579
1578
`_all` or empty string to perform the operation on all indices
1580
1579
:arg doc_type: A comma-separated list of document types to
@@ -1672,6 +1671,7 @@ async def search(
1672
1671
should be prefixed by their respective types in the response
1673
1672
:arg version: Specify whether to return document version as part
1674
1673
of a hit
1674
+ :arg body: The search definition using the Query DSL
1675
1675
"""
1676
1676
# from is a reserved word so it cannot be used, use from_ instead
1677
1677
if "from_" in params :
@@ -1801,7 +1801,7 @@ async def search_template(
1801
1801
"version_type" ,
1802
1802
)
1803
1803
async def termvectors (
1804
- self , index , body = None , doc_type = None , id = None , params = None , headers = None
1804
+ self , index , doc_type = None , id = None , body = None , params = None , headers = None
1805
1805
):
1806
1806
"""
1807
1807
Returns information and statistics about terms in the fields of a particular
@@ -1810,8 +1810,6 @@ async def termvectors(
1810
1810
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.x/docs-termvectors.html>`_
1811
1811
1812
1812
:arg index: The index in which the document resides.
1813
- :arg body: Define parameters and or supply a document to get
1814
- termvectors for. See documentation.
1815
1813
:arg doc_type: The type of the document.
1816
1814
:arg id: The id of the document, when not specified a doc param
1817
1815
should be supplied.
@@ -1835,6 +1833,8 @@ async def termvectors(
1835
1833
:arg version: Explicit version number for concurrency control
1836
1834
:arg version_type: Specific version type Valid choices:
1837
1835
internal, external, external_gte, force
1836
+ :arg body: Define parameters and or supply a document to get
1837
+ termvectors for. See documentation.
1838
1838
"""
1839
1839
if index in SKIP_IN_PATH :
1840
1840
raise ValueError ("Empty value passed for a required argument 'index'." )
@@ -1953,7 +1953,7 @@ async def update(self, index, id, body, doc_type=None, params=None, headers=None
1953
1953
"wait_for_completion" ,
1954
1954
)
1955
1955
async def update_by_query (
1956
- self , index , body = None , doc_type = None , params = None , headers = None
1956
+ self , index , doc_type = None , body = None , params = None , headers = None
1957
1957
):
1958
1958
"""
1959
1959
Performs an update on every document in the index without changing the source,
@@ -1963,7 +1963,6 @@ async def update_by_query(
1963
1963
1964
1964
:arg index: A comma-separated list of index names to search; use
1965
1965
`_all` or empty string to perform the operation on all indices
1966
- :arg body: The search definition using the Query DSL
1967
1966
:arg doc_type: A comma-separated list of document types to
1968
1967
search; leave empty to perform the operation on all types
1969
1968
:arg _source: True or false to return the _source field or not,
@@ -2037,6 +2036,7 @@ async def update_by_query(
2037
2036
+ 1)
2038
2037
:arg wait_for_completion: Should the request should block until
2039
2038
the update by query operation is complete. Default: True
2039
+ :arg body: The search definition using the Query DSL
2040
2040
"""
2041
2041
# from is a reserved word so it cannot be used, use from_ instead
2042
2042
if "from_" in params :
@@ -2197,7 +2197,6 @@ async def search_mvt(
2197
2197
:arg zoom: Zoom level for the vector tile to search
2198
2198
:arg x: X coordinate for the vector tile to search
2199
2199
:arg y: Y coordinate for the vector tile to search
2200
- :arg body: Search request body.
2201
2200
:arg exact_bounds: If false, the meta layer's feature is the
2202
2201
bounding box of the tile. If true, the meta layer's feature is a
2203
2202
bounding box resulting from a `geo_bounds` aggregation.
@@ -2209,6 +2208,7 @@ async def search_mvt(
2209
2208
aggs layer. Valid choices: grid, point Default: grid
2210
2209
:arg size: Maximum number of features to return in the hits
2211
2210
layer. Accepts 0-10000. Default: 10000
2211
+ :arg body: Search request body.
2212
2212
"""
2213
2213
for param in (index , field , zoom , x , y ):
2214
2214
if param in SKIP_IN_PATH :
0 commit comments