diff --git a/output/schema/schema.json b/output/schema/schema.json index 108107e4a4..08181442bc 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -43161,9 +43161,21 @@ ], "kind": "union_of" } + }, + { + "description": "The minimum similarity for a vector to be considered a match", + "name": "similarity", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } } ], - "specLocation": "_types/Knn.ts#L26-L41" + "specLocation": "_types/Knn.ts#L26-L43" }, { "kind": "interface", @@ -44506,7 +44518,7 @@ } } ], - "specLocation": "_types/Knn.ts#L43-L46", + "specLocation": "_types/Knn.ts#L45-L48", "variants": { "kind": "container" } @@ -46697,7 +46709,7 @@ } } ], - "specLocation": "_types/Knn.ts#L48-L51" + "specLocation": "_types/Knn.ts#L50-L53" }, { "kind": "enum", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 74fdb7c48d..65a485072d 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2339,6 +2339,7 @@ export interface KnnQuery { num_candidates: long boost?: float filter?: QueryDslQueryContainer | QueryDslQueryContainer[] + similarity?: float } export interface LatLonGeoLocation { diff --git a/specification/_types/Knn.ts b/specification/_types/Knn.ts index 2a3b4a9422..3ac82a11ed 100644 --- a/specification/_types/Knn.ts +++ b/specification/_types/Knn.ts @@ -18,7 +18,7 @@ */ import { Field } from '@_types/common' -import { long, double, float } from '@_types/Numeric' +import { long, float } from '@_types/Numeric' import { QueryContainer } from './query_dsl/abstractions' export type QueryVector = float[] @@ -38,6 +38,8 @@ export interface KnnQuery { boost?: float /** Filters for the kNN search query */ filter?: QueryContainer | QueryContainer[] + /** The minimum similarity for a vector to be considered a match */ + similarity?: float } /** @variants container */