Skip to content

Commit beda885

Browse files
committed
Add rescore_vector to knn query and knn section
1 parent 58f9e67 commit beda885

File tree

3 files changed

+65
-4
lines changed

3 files changed

+65
-4
lines changed

output/schema/schema.json

Lines changed: 50 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/Knn.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ export type QueryVector = float[]
2727
/* KnnSearch (used in kNN search) and KnnQuery (ued in kNN queries) are close
2828
* but different enough to require different classes */
2929

30+
export interface RescoreVector {
31+
/** Applies the specified oversample factor to k on the approximate kNN search */
32+
oversample: float
33+
}
34+
3035
export interface KnnSearch {
3136
/** The name of the vector field to search against */
3237
field: Field
@@ -49,6 +54,8 @@ export interface KnnSearch {
4954
* @doc_id knn-inner-hits
5055
*/
5156
inner_hits?: InnerHits
57+
/** Apply oversampling and rescoring to quantized vectors */
58+
rescore_vector?: RescoreVector
5259
}
5360

5461
/**
@@ -69,6 +76,8 @@ export interface KnnQuery extends QueryBase {
6976
filter?: QueryContainer | QueryContainer[]
7077
/** The minimum similarity for a vector to be considered a match */
7178
similarity?: float
79+
/** Apply oversampling and rescoring to quantized vectors */
80+
rescore_vector?: RescoreVector
7281
}
7382

7483
/** @variants container */

0 commit comments

Comments
 (0)