diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index ed0ac8f9f..56d17f6db 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -917,7 +917,7 @@ If `false`, the response does not include the total number of hits matching the ** *`indices_boost` (Optional, Record[])*: 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. @@ -1429,7 +1429,7 @@ Defaults to 10,000 hits. ** *`indices_boost` (Optional, Record[])*: 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, rule_query, 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 bb6172874..7748aa7e7 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -2271,6 +2271,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 9baaacbc2..8b077f0f6 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -2344,6 +2344,7 @@ export interface KnnQuery { num_candidates: long boost?: float filter?: QueryDslQueryContainer | QueryDslQueryContainer[] + similarity?: float } export interface LatLonGeoLocation {