diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 9fac821dab..4073f4688c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -68854,6 +68854,9 @@ }, "type": { "$ref": "#/components/schemas/_types.mapping:DenseVectorIndexOptionsType" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types.mapping:DenseVectorIndexOptionsRescoreVector" } }, "required": [ @@ -68873,6 +68876,18 @@ "int8_hnsw" ] }, + "_types.mapping:DenseVectorIndexOptionsRescoreVector": { + "type": "object", + "properties": { + "oversample": { + "description": "The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.\nWhen provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.\n\nvalid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.", + "type": "number" + } + }, + "required": [ + "oversample" + ] + }, "_types.mapping:DenseVectorSimilarity": { "type": "string", "enum": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b2e1a28282..4db168f68c 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45468,6 +45468,9 @@ }, "type": { "$ref": "#/components/schemas/_types.mapping:DenseVectorIndexOptionsType" + }, + "rescore_vector": { + "$ref": "#/components/schemas/_types.mapping:DenseVectorIndexOptionsRescoreVector" } }, "required": [ @@ -45487,6 +45490,18 @@ "int8_hnsw" ] }, + "_types.mapping:DenseVectorIndexOptionsRescoreVector": { + "type": "object", + "properties": { + "oversample": { + "description": "The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.\nWhen provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.\n\nvalid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.", + "type": "number" + } + }, + "required": [ + "oversample" + ] + }, "_types.mapping:DenseVectorSimilarity": { "type": "string", "enum": [ diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index d356793375..4e88419416 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -94205,7 +94205,7 @@ "name": "DenseVectorIndexOptionsType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/DenseVectorProperty.ts#L164-L209" + "specLocation": "_types/mapping/DenseVectorProperty.ts#L168-L213" }, { "kind": "enum", @@ -96803,9 +96803,43 @@ "namespace": "_types.mapping" } } + }, + { + "description": "The rescore vector options. This is only applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and `int8_flat` index types.", + "name": "rescore_vector", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DenseVectorIndexOptionsRescoreVector", + "namespace": "_types.mapping" + } + } + } + ], + "specLocation": "_types/mapping/DenseVectorProperty.ts#L129-L166" + }, + { + "kind": "interface", + "name": { + "name": "DenseVectorIndexOptionsRescoreVector", + "namespace": "_types.mapping" + }, + "properties": [ + { + "description": "The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.\nWhen provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.\n\nvalid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.", + "name": "oversample", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } } ], - "specLocation": "_types/mapping/DenseVectorProperty.ts#L129-L162" + "specLocation": "_types/mapping/DenseVectorProperty.ts#L215-L223" }, { "inherits": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 6a12fe435c..3b28ee95d0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -77938,9 +77938,43 @@ "namespace": "_types.mapping" } } + }, + { + "description": "The rescore vector options. This is only applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and `int8_flat` index types.", + "name": "rescore_vector", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DenseVectorIndexOptionsRescoreVector", + "namespace": "_types.mapping" + } + } + } + ], + "specLocation": "_types/mapping/DenseVectorProperty.ts#L129-L166" + }, + { + "kind": "interface", + "name": { + "name": "DenseVectorIndexOptionsRescoreVector", + "namespace": "_types.mapping" + }, + "properties": [ + { + "description": "The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`.\nWhen provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.\n\nvalid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.", + "name": "oversample", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } } ], - "specLocation": "_types/mapping/DenseVectorProperty.ts#L129-L162" + "specLocation": "_types/mapping/DenseVectorProperty.ts#L215-L223" }, { "kind": "enum", @@ -77982,7 +78016,7 @@ "name": "DenseVectorIndexOptionsType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/DenseVectorProperty.ts#L164-L209" + "specLocation": "_types/mapping/DenseVectorProperty.ts#L168-L213" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e9637ca85f..8231aaa7b7 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5493,6 +5493,11 @@ export interface MappingDenseVectorIndexOptions { ef_construction?: integer m?: integer type: MappingDenseVectorIndexOptionsType + rescore_vector?: MappingDenseVectorIndexOptionsRescoreVector +} + +export interface MappingDenseVectorIndexOptionsRescoreVector { + oversample: float } export type MappingDenseVectorIndexOptionsType = 'bbq_flat' | 'bbq_hnsw' | 'flat' | 'hnsw' | 'int4_flat' | 'int4_hnsw' | 'int8_flat' | 'int8_hnsw' diff --git a/specification/_types/mapping/DenseVectorProperty.ts b/specification/_types/mapping/DenseVectorProperty.ts index c2f2d4646c..5d0a66c6ce 100644 --- a/specification/_types/mapping/DenseVectorProperty.ts +++ b/specification/_types/mapping/DenseVectorProperty.ts @@ -159,6 +159,10 @@ export class DenseVectorIndexOptions { * The type of kNN algorithm to use. */ type: DenseVectorIndexOptionsType + /** + * The rescore vector options. This is only applicable to `bbq_hnsw`, `int4_hnsw`, `int8_hnsw`, `bbq_flat`, `int4_flat`, and `int8_flat` index types. + */ + rescore_vector?: DenseVectorIndexOptionsRescoreVector } export enum DenseVectorIndexOptionsType { @@ -207,3 +211,13 @@ export enum DenseVectorIndexOptionsType { */ int8_hnsw } + +export class DenseVectorIndexOptionsRescoreVector { + /** + * The oversampling factor to use when searching for the nearest neighbor. This is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`. + * When provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors. + * + * valid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling. + */ + oversample: float +}