From 2bb969e4c925b5822626005e373eb5f2ec6749eb Mon Sep 17 00:00:00 2001
From: Elastic Machine <elasticmachine@users.noreply.github.com>
Date: Thu, 28 Sep 2023 06:03:16 +0000
Subject: [PATCH] Auto-generated API code

---
 docs/reference.asciidoc     | 4 ++--
 src/api/types.ts            | 1 +
 src/api/typesWithBodyKey.ts | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc
index ac54f0ec3..101c435fe 100644
--- a/docs/reference.asciidoc
+++ b/docs/reference.asciidoc
@@ -824,7 +824,7 @@ Defaults to 10,000 hits.
 ** *`indices_boost` (Optional, Record<string, number>[])*: Boosts the _score of documents from specified indices.
 ** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns doc values for field
 names matching these patterns in the hits.fields property of the response.
-** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter }[])*: Defines the approximate kNN search to run.
+** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity }[])*: Defines the approximate kNN search to run.
 ** *`rank` (Optional, { rrf })*: Defines the Reciprocal Rank Fusion (RRF) to use
 ** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are
 not included in the search results.
@@ -1254,7 +1254,7 @@ Defaults to 10,000 hits.
 ** *`indices_boost` (Optional, Record<string, number>[])*: Boosts the _score of documents from specified indices.
 ** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns doc values for field
 names matching these patterns in the hits.fields property of the response.
-** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter }[])*: Defines the approximate kNN search to run.
+** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter, similarity }[])*: Defines the approximate kNN search to run.
 ** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are
 not included in the search results.
 ** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*
diff --git a/src/api/types.ts b/src/api/types.ts
index c4bc4dc11..b9201df17 100644
--- a/src/api/types.ts
+++ b/src/api/types.ts
@@ -2235,6 +2235,7 @@ export interface KnnQuery {
   num_candidates: long
   boost?: float
   filter?: QueryDslQueryContainer | QueryDslQueryContainer[]
+  similarity?: float
 }
 
 export interface LatLonGeoLocation {
diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts
index a15cb2370..d824d00b5 100644
--- a/src/api/typesWithBodyKey.ts
+++ b/src/api/typesWithBodyKey.ts
@@ -2308,6 +2308,7 @@ export interface KnnQuery {
   num_candidates: long
   boost?: float
   filter?: QueryDslQueryContainer | QueryDslQueryContainer[]
+  similarity?: float
 }
 
 export interface LatLonGeoLocation {