@@ -743,7 +743,8 @@ async def clear_scroll(
743
743
body : t .Optional [t .Dict [str , t .Any ]] = None ,
744
744
) -> ObjectApiResponse [t .Any ]:
745
745
"""
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.
747
748
748
749
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/clear-scroll-api.html>`_
749
750
@@ -793,7 +794,11 @@ async def close_point_in_time(
793
794
body : t .Optional [t .Dict [str , t .Any ]] = None ,
794
795
) -> ObjectApiResponse [t .Any ]:
795
796
"""
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.
797
802
798
803
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
799
804
@@ -1844,10 +1849,11 @@ async def field_caps(
1844
1849
body : t .Optional [t .Dict [str , t .Any ]] = None ,
1845
1850
) -> ObjectApiResponse [t .Any ]:
1846
1851
"""
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.
1851
1857
1852
1858
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-field-caps.html>`_
1853
1859
@@ -2490,6 +2496,7 @@ async def info(
2490
2496
),
2491
2497
parameter_aliases = {"_source" : "source" },
2492
2498
)
2499
+ @_stability_warning (Stability .EXPERIMENTAL )
2493
2500
async def knn_search (
2494
2501
self ,
2495
2502
* ,
@@ -2510,7 +2517,15 @@ async def knn_search(
2510
2517
body : t .Optional [t .Dict [str , t .Any ]] = None ,
2511
2518
) -> ObjectApiResponse [t .Any ]:
2512
2519
"""
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.
2514
2529
2515
2530
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
2516
2531
@@ -2873,7 +2888,7 @@ async def msearch_template(
2873
2888
typed_keys : t .Optional [bool ] = None ,
2874
2889
) -> ObjectApiResponse [t .Any ]:
2875
2890
"""
2876
- Runs multiple templated searches with a single request .
2891
+ Run multiple templated searches.
2877
2892
2878
2893
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
2879
2894
@@ -3083,13 +3098,15 @@ async def open_point_in_time(
3083
3098
body : t .Optional [t .Dict [str , t .Any ]] = None ,
3084
3099
) -> ObjectApiResponse [t .Any ]:
3085
3100
"""
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.
3093
3110
3094
3111
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
3095
3112
@@ -3256,8 +3273,8 @@ async def rank_eval(
3256
3273
body : t .Optional [t .Dict [str , t .Any ]] = None ,
3257
3274
) -> ObjectApiResponse [t .Any ]:
3258
3275
"""
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.
3261
3278
3262
3279
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-rank-eval.html>`_
3263
3280
@@ -3501,7 +3518,7 @@ async def render_search_template(
3501
3518
body : t .Optional [t .Dict [str , t .Any ]] = None ,
3502
3519
) -> ObjectApiResponse [t .Any ]:
3503
3520
"""
3504
- Renders a search template as a search request body.
3521
+ Render a search template. Render a search template as a search request body.
3505
3522
3506
3523
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/render-search-template-api.html>`_
3507
3524
@@ -3833,9 +3850,9 @@ async def search(
3833
3850
body : t .Optional [t .Dict [str , t .Any ]] = None ,
3834
3851
) -> ObjectApiResponse [t .Any ]:
3835
3852
"""
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.
3839
3856
3840
3857
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
3841
3858
@@ -4265,7 +4282,7 @@ async def search_mvt(
4265
4282
body : t .Optional [t .Dict [str , t .Any ]] = None ,
4266
4283
) -> BinaryApiResponse :
4267
4284
"""
4268
- Search a vector tile. Searches a vector tile for geospatial values.
4285
+ Search a vector tile. Search a vector tile for geospatial values.
4269
4286
4270
4287
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-vector-tile-api.html>`_
4271
4288
@@ -4419,8 +4436,10 @@ async def search_shards(
4419
4436
routing : t .Optional [str ] = None ,
4420
4437
) -> ObjectApiResponse [t .Any ]:
4421
4438
"""
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.
4424
4443
4425
4444
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-shards.html>`_
4426
4445
@@ -4521,7 +4540,7 @@ async def search_template(
4521
4540
body : t .Optional [t .Dict [str , t .Any ]] = None ,
4522
4541
) -> ObjectApiResponse [t .Any ]:
4523
4542
"""
4524
- Runs a search with a search template.
4543
+ Run a search with a search template.
4525
4544
4526
4545
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-template.html>`_
4527
4546
@@ -4759,8 +4778,8 @@ async def termvectors(
4759
4778
body : t .Optional [t .Dict [str , t .Any ]] = None ,
4760
4779
) -> ObjectApiResponse [t .Any ]:
4761
4780
"""
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.
4764
4783
4765
4784
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-termvectors.html>`_
4766
4785
0 commit comments