Skip to content

Commit ca07616

Browse files
committed
Address review comments
1 parent 7a668f4 commit ca07616

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

specification/_types/Knn.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,21 @@ export interface KnnSearch {
5151
inner_hits?: InnerHits
5252
}
5353

54-
export interface KnnQuery {
54+
export class KnnQuery extends QueryBase {
5555
/** The name of the vector field to search against */
5656
field: Field
5757
/** The query vector */
5858
query_vector?: QueryVector
5959
/** The query vector builder. You must provide a query_vector_builder or query_vector, but not both. */
6060
query_vector_builder?: QueryVectorBuilder
61-
/** The final number of nearest neighbors to return as top hits */
62-
k: long
6361
/** The number of nearest neighbor candidates to consider per shard */
64-
num_candidates: long
62+
num_candidates?: long
6563
/** Boost value to apply to kNN scores */
6664
boost?: float
6765
/** Filters for the kNN search query */
6866
filter?: QueryContainer | QueryContainer[]
6967
/** The minimum similarity for a vector to be considered a match */
7068
similarity?: float
71-
/**
72-
* If defined, each search hit will contain inner hits.
73-
* @doc_id knn-inner-hits
74-
*/
75-
inner_hits?: InnerHits
7669
}
7770

7871
/** @variants container */

0 commit comments

Comments
 (0)