Skip to content

Commit 9b9d086

Browse files
authored
adding rescore_vector to dense vector mapping definition options (#4182)
1 parent 3e97c19 commit 9b9d086

File tree

6 files changed

+121
-4
lines changed

6 files changed

+121
-4
lines changed

output/openapi/elasticsearch-openapi.json

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

output/openapi/elasticsearch-serverless-openapi.json

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

output/schema/schema-serverless.json

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

output/schema/schema.json

Lines changed: 36 additions & 2 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: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/mapping/DenseVectorProperty.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ export class DenseVectorIndexOptions {
159159
* The type of kNN algorithm to use.
160160
*/
161161
type: DenseVectorIndexOptionsType
162+
/**
163+
* The rescore vector options. This is only applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and `int8_flat` index types.
164+
*/
165+
rescore_vector?: DenseVectorIndexOptionsRescoreVector
162166
}
163167

164168
export enum DenseVectorIndexOptionsType {
@@ -207,3 +211,13 @@ export enum DenseVectorIndexOptionsType {
207211
*/
208212
int8_hnsw
209213
}
214+
215+
export class DenseVectorIndexOptionsRescoreVector {
216+
/**
217+
* The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.
218+
* When provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.
219+
*
220+
* valid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.
221+
*/
222+
oversample: float
223+
}

0 commit comments

Comments
 (0)