@@ -743,7 +743,8 @@ async def clear_scroll(
743743 body : t .Optional [t .Dict [str , t .Any ]] = None ,
744744 ) -> ObjectApiResponse [t .Any ]:
745745 """
746- Clears the search context and results for a scrolling search.
746+ Clear a scrolling search. Clear the search context and results for a scrolling
747+ search.
747748
748749 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/clear-scroll-api.html>`_
749750
@@ -793,7 +794,11 @@ async def close_point_in_time(
793794 body : t .Optional [t .Dict [str , t .Any ]] = None ,
794795 ) -> ObjectApiResponse [t .Any ]:
795796 """
796- Closes a point-in-time.
797+ Close a point in time. A point in time must be opened explicitly before being
798+ used in search requests. The `keep_alive` parameter tells Elasticsearch how long
799+ it should persist. A point in time is automatically closed when the `keep_alive`
800+ period has elapsed. However, keeping points in time has a cost; close them as
801+ soon as they are no longer required for search requests.
797802
798803 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
799804
@@ -1844,10 +1849,11 @@ async def field_caps(
18441849 body : t .Optional [t .Dict [str , t .Any ]] = None ,
18451850 ) -> ObjectApiResponse [t .Any ]:
18461851 """
1847- The field capabilities API returns the information about the capabilities of
1848- fields among multiple indices. The field capabilities API returns runtime fields
1849- like any other field. For example, a runtime field with a type of keyword is
1850- returned as any other field that belongs to the `keyword` family.
1852+ Get the field capabilities. Get information about the capabilities of fields
1853+ among multiple indices. For data streams, the API returns field capabilities
1854+ among the stream’s backing indices. It returns runtime fields like any other
1855+ field. For example, a runtime field with a type of keyword is returned the same
1856+ as any other field that belongs to the `keyword` family.
18511857
18521858 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-field-caps.html>`_
18531859
@@ -2490,6 +2496,7 @@ async def info(
24902496 ),
24912497 parameter_aliases = {"_source" : "source" },
24922498 )
2499+ @_stability_warning (Stability .EXPERIMENTAL )
24932500 async def knn_search (
24942501 self ,
24952502 * ,
@@ -2510,7 +2517,15 @@ async def knn_search(
25102517 body : t .Optional [t .Dict [str , t .Any ]] = None ,
25112518 ) -> ObjectApiResponse [t .Any ]:
25122519 """
2513- Performs a kNN search.
2520+ Run a knn search. NOTE: The kNN search API has been replaced by the `knn` option
2521+ in the search API. Perform a k-nearest neighbor (kNN) search on a dense_vector
2522+ field and return the matching documents. Given a query vector, the API finds
2523+ the k closest vectors and returns those documents as search hits. Elasticsearch
2524+ uses the HNSW algorithm to support efficient kNN search. Like most kNN algorithms,
2525+ HNSW is an approximate method that sacrifices result accuracy for improved search
2526+ speed. This means the results returned are not always the true k closest neighbors.
2527+ The kNN search API supports restricting the search using a filter. The search
2528+ will return the top k documents that also match the filter query.
25142529
25152530 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
25162531
@@ -2873,7 +2888,7 @@ async def msearch_template(
28732888 typed_keys : t .Optional [bool ] = None ,
28742889 ) -> ObjectApiResponse [t .Any ]:
28752890 """
2876- Runs multiple templated searches with a single request .
2891+ Run multiple templated searches.
28772892
28782893 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
28792894
@@ -3083,13 +3098,15 @@ async def open_point_in_time(
30833098 body : t .Optional [t .Dict [str , t .Any ]] = None ,
30843099 ) -> ObjectApiResponse [t .Any ]:
30853100 """
3086- A search request by default executes against the most recent visible data of
3087- the target indices, which is called point in time. Elasticsearch pit (point in
3088- time) is a lightweight view into the state of the data as it existed when initiated.
3089- In some cases, it’s preferred to perform multiple search requests using the same
3090- point in time. For example, if refreshes happen between `search_after` requests,
3091- then the results of those requests might not be consistent as changes happening
3092- between searches are only visible to the more recent point in time.
3101+ Open a point in time. A search request by default runs against the most recent
3102+ visible data of the target indices, which is called point in time. Elasticsearch
3103+ pit (point in time) is a lightweight view into the state of the data as it existed
3104+ when initiated. In some cases, it’s preferred to perform multiple search requests
3105+ using the same point in time. For example, if refreshes happen between `search_after`
3106+ requests, then the results of those requests might not be consistent as changes
3107+ happening between searches are only visible to the more recent point in time.
3108+ A point in time must be opened explicitly before being used in search requests.
3109+ The `keep_alive` parameter tells Elasticsearch how long it should persist.
30933110
30943111 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
30953112
@@ -3256,8 +3273,8 @@ async def rank_eval(
32563273 body : t .Optional [t .Dict [str , t .Any ]] = None ,
32573274 ) -> ObjectApiResponse [t .Any ]:
32583275 """
3259- Enables you to evaluate the quality of ranked search results over a set of typical
3260- search queries.
3276+ Evaluate ranked search results. Evaluate the quality of ranked search results
3277+ over a set of typical search queries.
32613278
32623279 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-rank-eval.html>`_
32633280
@@ -3501,7 +3518,7 @@ async def render_search_template(
35013518 body : t .Optional [t .Dict [str , t .Any ]] = None ,
35023519 ) -> ObjectApiResponse [t .Any ]:
35033520 """
3504- Renders a search template as a search request body.
3521+ Render a search template. Render a search template as a search request body.
35053522
35063523 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/render-search-template-api.html>`_
35073524
@@ -3833,9 +3850,9 @@ async def search(
38333850 body : t .Optional [t .Dict [str , t .Any ]] = None ,
38343851 ) -> ObjectApiResponse [t .Any ]:
38353852 """
3836- Returns search hits that match the query defined in the request. You can provide
3837- search queries using the `q` query string parameter or the request body. If both
3838- are specified, only the query parameter is used.
3853+ Run a search. Get search hits that match the query defined in the request. You
3854+ can provide search queries using the `q` query string parameter or the request
3855+ body. If both are specified, only the query parameter is used.
38393856
38403857 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
38413858
@@ -4265,7 +4282,7 @@ async def search_mvt(
42654282 body : t .Optional [t .Dict [str , t .Any ]] = None ,
42664283 ) -> BinaryApiResponse :
42674284 """
4268- Search a vector tile. Searches a vector tile for geospatial values.
4285+ Search a vector tile. Search a vector tile for geospatial values.
42694286
42704287 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-vector-tile-api.html>`_
42714288
@@ -4419,8 +4436,10 @@ async def search_shards(
44194436 routing : t .Optional [str ] = None ,
44204437 ) -> ObjectApiResponse [t .Any ]:
44214438 """
4422- Returns information about the indices and shards that a search request would
4423- be executed against.
4439+ Get the search shards. Get the indices and shards that a search request would
4440+ be run against. This information can be useful for working out issues or planning
4441+ optimizations with routing and shard preferences. When filtered aliases are used,
4442+ the filter is returned as part of the indices section.
44244443
44254444 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-shards.html>`_
44264445
@@ -4521,7 +4540,7 @@ async def search_template(
45214540 body : t .Optional [t .Dict [str , t .Any ]] = None ,
45224541 ) -> ObjectApiResponse [t .Any ]:
45234542 """
4524- Runs a search with a search template.
4543+ Run a search with a search template.
45254544
45264545 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-template.html>`_
45274546
@@ -4759,8 +4778,8 @@ async def termvectors(
47594778 body : t .Optional [t .Dict [str , t .Any ]] = None ,
47604779 ) -> ObjectApiResponse [t .Any ]:
47614780 """
4762- Get term vector information. Returns information and statistics about terms in
4763- the fields of a particular document.
4781+ Get term vector information. Get information and statistics about terms in the
4782+ fields of a particular document.
47644783
47654784 `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-termvectors.html>`_
47664785
0 commit comments