From b2d75a9770d4561a2aee507b97ab4205bf51fa92 Mon Sep 17 00:00:00 2001 From: John Wagster Date: Wed, 15 Oct 2025 10:04:04 -0500 Subject: [PATCH 1/3] adding visit_percentage --- output/openapi/elasticsearch-openapi.json | 12 +++++ .../elasticsearch-serverless-openapi.json | 12 +++++ output/schema/schema.json | 54 +++++++++++++++---- output/typescript/types.ts | 3 ++ specification/_types/Knn.ts | 4 ++ specification/_types/Retriever.ts | 2 + 6 files changed, 78 insertions(+), 9 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 1129e9883f..c90e35aa29 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -62891,6 +62891,10 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "type": "number" + }, "boost": { "description": "Boost value to apply to kNN scores", "type": "number" @@ -63322,6 +63326,10 @@ "description": "Number of nearest neighbor candidates to consider per shard.", "type": "number" }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "type": "number" + }, "similarity": { "description": "The minimum similarity required for a document to be considered a match.", "type": "number" @@ -64824,6 +64832,10 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "type": "number" + }, "k": { "description": "The final number of nearest neighbors to return as top hits", "type": "number" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b46ac50cfe..96dfd38e02 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -39144,6 +39144,10 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "type": "number" + }, "boost": { "description": "Boost value to apply to kNN scores", "type": "number" @@ -39537,6 +39541,10 @@ "description": "Number of nearest neighbor candidates to consider per shard.", "type": "number" }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "type": "number" + }, "similarity": { "description": "The minimum similarity required for a document to be considered a match.", "type": "number" @@ -41039,6 +41047,10 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, + "visit_percentage": { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "type": "number" + }, "k": { "description": "The final number of nearest neighbors to return as top hits", "type": "number" diff --git a/output/schema/schema.json b/output/schema/schema.json index dbffa0b55a..2f18ea4401 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -50853,7 +50853,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L176-L181" + "specLocation": "_types/Retriever.ts#L178-L183" }, { "kind": "type_alias", @@ -54017,6 +54017,18 @@ } } }, + { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "name": "visit_percentage", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + }, { "description": "The final number of nearest neighbors to return as top hits", "name": "k", @@ -54087,7 +54099,7 @@ } } ], - "specLocation": "_types/Knn.ts#L64-L87" + "specLocation": "_types/Knn.ts#L66-L91" }, { "kind": "interface", @@ -54162,6 +54174,18 @@ } } }, + { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "name": "visit_percentage", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + }, { "description": "The minimum similarity required for a document to be considered a match.", "name": "similarity", @@ -54193,7 +54217,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L116-L134" + "specLocation": "_types/Retriever.ts#L116-L136" }, { "kind": "interface", @@ -54262,6 +54286,18 @@ } } }, + { + "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", + "name": "visit_percentage", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "float", + "namespace": "_types" + } + } + }, { "description": "Boost value to apply to kNN scores", "name": "boost", @@ -54346,7 +54382,7 @@ } } ], - "specLocation": "_types/Knn.ts#L35-L62" + "specLocation": "_types/Knn.ts#L35-L64" }, { "kind": "interface", @@ -55840,7 +55876,7 @@ } } ], - "specLocation": "_types/Knn.ts#L89-L92", + "specLocation": "_types/Knn.ts#L93-L96", "variants": { "kind": "container" } @@ -55923,7 +55959,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L136-L145" + "specLocation": "_types/Retriever.ts#L138-L147" }, { "kind": "interface", @@ -56691,7 +56727,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L165-L174" + "specLocation": "_types/Retriever.ts#L167-L176" }, { "kind": "type_alias", @@ -58685,7 +58721,7 @@ } } ], - "specLocation": "_types/Knn.ts#L94-L103" + "specLocation": "_types/Knn.ts#L98-L107" }, { "kind": "interface", @@ -58782,7 +58818,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L147-L163" + "specLocation": "_types/Retriever.ts#L149-L165" }, { "kind": "enum", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a90a0dd993..b7ed852ac4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2543,6 +2543,7 @@ export interface KnnQuery extends QueryDslQueryBase { query_vector?: QueryVector query_vector_builder?: QueryVectorBuilder num_candidates?: integer + visit_percentage?: float k?: integer filter?: QueryDslQueryContainer | QueryDslQueryContainer[] similarity?: float @@ -2555,6 +2556,7 @@ export interface KnnRetriever extends RetrieverBase { query_vector_builder?: QueryVectorBuilder k: integer num_candidates: integer + visit_percentage?: float similarity?: float rescore_vector?: RescoreVector } @@ -2565,6 +2567,7 @@ export interface KnnSearch { query_vector_builder?: QueryVectorBuilder k?: integer num_candidates?: integer + visit_percentage?: float boost?: float filter?: QueryDslQueryContainer | QueryDslQueryContainer[] similarity?: float diff --git a/specification/_types/Knn.ts b/specification/_types/Knn.ts index f5fef4666a..2a76d71e90 100644 --- a/specification/_types/Knn.ts +++ b/specification/_types/Knn.ts @@ -43,6 +43,8 @@ export interface KnnSearch { k?: integer /** The number of nearest neighbor candidates to consider per shard */ num_candidates?: integer + /** The percentage of vectors to explore per shard while doing knn search with bbq_disk */ + visit_percentage?: float /** Boost value to apply to kNN scores */ boost?: float /** Filters for the kNN search query */ @@ -73,6 +75,8 @@ export interface KnnQuery extends QueryBase { query_vector_builder?: QueryVectorBuilder /** The number of nearest neighbor candidates to consider per shard */ num_candidates?: integer + /** The percentage of vectors to explore per shard while doing knn search with bbq_disk */ + visit_percentage?: float /** The final number of nearest neighbors to return as top hits */ k?: integer /** Filters for the kNN search query */ diff --git a/specification/_types/Retriever.ts b/specification/_types/Retriever.ts index 7ab388bc35..01860a2d6b 100644 --- a/specification/_types/Retriever.ts +++ b/specification/_types/Retriever.ts @@ -124,6 +124,8 @@ export class KnnRetriever extends RetrieverBase { k: integer /** Number of nearest neighbor candidates to consider per shard. */ num_candidates: integer + /** The percentage of vectors to explore per shard while doing knn search with bbq_disk */ + visit_percentage?: float /** The minimum similarity required for a document to be considered a match. */ similarity?: float /** Apply oversampling and rescoring to quantized vectors From 8ad0fb172937ff182689017ac8c157c4e295e64c Mon Sep 17 00:00:00 2001 From: John Wagster Date: Wed, 15 Oct 2025 10:18:30 -0500 Subject: [PATCH 2/3] removing build related updates --- output/openapi/elasticsearch-openapi.json | 12 ----- .../elasticsearch-serverless-openapi.json | 12 ----- output/schema/schema.json | 54 ++++--------------- output/typescript/types.ts | 3 -- 4 files changed, 9 insertions(+), 72 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index c90e35aa29..1129e9883f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -62891,10 +62891,6 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, - "visit_percentage": { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "type": "number" - }, "boost": { "description": "Boost value to apply to kNN scores", "type": "number" @@ -63326,10 +63322,6 @@ "description": "Number of nearest neighbor candidates to consider per shard.", "type": "number" }, - "visit_percentage": { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "type": "number" - }, "similarity": { "description": "The minimum similarity required for a document to be considered a match.", "type": "number" @@ -64832,10 +64824,6 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, - "visit_percentage": { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "type": "number" - }, "k": { "description": "The final number of nearest neighbors to return as top hits", "type": "number" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 96dfd38e02..b46ac50cfe 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -39144,10 +39144,6 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, - "visit_percentage": { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "type": "number" - }, "boost": { "description": "Boost value to apply to kNN scores", "type": "number" @@ -39541,10 +39537,6 @@ "description": "Number of nearest neighbor candidates to consider per shard.", "type": "number" }, - "visit_percentage": { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "type": "number" - }, "similarity": { "description": "The minimum similarity required for a document to be considered a match.", "type": "number" @@ -41047,10 +41039,6 @@ "description": "The number of nearest neighbor candidates to consider per shard", "type": "number" }, - "visit_percentage": { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "type": "number" - }, "k": { "description": "The final number of nearest neighbors to return as top hits", "type": "number" diff --git a/output/schema/schema.json b/output/schema/schema.json index 2f18ea4401..dbffa0b55a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -50853,7 +50853,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L178-L183" + "specLocation": "_types/Retriever.ts#L176-L181" }, { "kind": "type_alias", @@ -54017,18 +54017,6 @@ } } }, - { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "name": "visit_percentage", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, { "description": "The final number of nearest neighbors to return as top hits", "name": "k", @@ -54099,7 +54087,7 @@ } } ], - "specLocation": "_types/Knn.ts#L66-L91" + "specLocation": "_types/Knn.ts#L64-L87" }, { "kind": "interface", @@ -54174,18 +54162,6 @@ } } }, - { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "name": "visit_percentage", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, { "description": "The minimum similarity required for a document to be considered a match.", "name": "similarity", @@ -54217,7 +54193,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L116-L136" + "specLocation": "_types/Retriever.ts#L116-L134" }, { "kind": "interface", @@ -54286,18 +54262,6 @@ } } }, - { - "description": "The percentage of vectors to explore per shard while doing knn search with bbq_disk", - "name": "visit_percentage", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "float", - "namespace": "_types" - } - } - }, { "description": "Boost value to apply to kNN scores", "name": "boost", @@ -54382,7 +54346,7 @@ } } ], - "specLocation": "_types/Knn.ts#L35-L64" + "specLocation": "_types/Knn.ts#L35-L62" }, { "kind": "interface", @@ -55876,7 +55840,7 @@ } } ], - "specLocation": "_types/Knn.ts#L93-L96", + "specLocation": "_types/Knn.ts#L89-L92", "variants": { "kind": "container" } @@ -55959,7 +55923,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L138-L147" + "specLocation": "_types/Retriever.ts#L136-L145" }, { "kind": "interface", @@ -56727,7 +56691,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L167-L176" + "specLocation": "_types/Retriever.ts#L165-L174" }, { "kind": "type_alias", @@ -58721,7 +58685,7 @@ } } ], - "specLocation": "_types/Knn.ts#L98-L107" + "specLocation": "_types/Knn.ts#L94-L103" }, { "kind": "interface", @@ -58818,7 +58782,7 @@ } } ], - "specLocation": "_types/Retriever.ts#L149-L165" + "specLocation": "_types/Retriever.ts#L147-L163" }, { "kind": "enum", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b7ed852ac4..a90a0dd993 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2543,7 +2543,6 @@ export interface KnnQuery extends QueryDslQueryBase { query_vector?: QueryVector query_vector_builder?: QueryVectorBuilder num_candidates?: integer - visit_percentage?: float k?: integer filter?: QueryDslQueryContainer | QueryDslQueryContainer[] similarity?: float @@ -2556,7 +2555,6 @@ export interface KnnRetriever extends RetrieverBase { query_vector_builder?: QueryVectorBuilder k: integer num_candidates: integer - visit_percentage?: float similarity?: float rescore_vector?: RescoreVector } @@ -2567,7 +2565,6 @@ export interface KnnSearch { query_vector_builder?: QueryVectorBuilder k?: integer num_candidates?: integer - visit_percentage?: float boost?: float filter?: QueryDslQueryContainer | QueryDslQueryContainer[] similarity?: float From 1f5026af62ce063cd538033541ea86a1e274953f Mon Sep 17 00:00:00 2001 From: John Wagster Date: Wed, 15 Oct 2025 10:44:31 -0500 Subject: [PATCH 3/3] added availability annotations --- specification/_types/Knn.ts | 10 ++++++++-- specification/_types/Retriever.ts | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/specification/_types/Knn.ts b/specification/_types/Knn.ts index 2a76d71e90..541411301f 100644 --- a/specification/_types/Knn.ts +++ b/specification/_types/Knn.ts @@ -43,7 +43,10 @@ export interface KnnSearch { k?: integer /** The number of nearest neighbor candidates to consider per shard */ num_candidates?: integer - /** The percentage of vectors to explore per shard while doing knn search with bbq_disk */ + /** The percentage of vectors to explore per shard while doing knn search with bbq_disk + * @availability stack since=9.2.0 + * @availability serverless + */ visit_percentage?: float /** Boost value to apply to kNN scores */ boost?: float @@ -75,7 +78,10 @@ export interface KnnQuery extends QueryBase { query_vector_builder?: QueryVectorBuilder /** The number of nearest neighbor candidates to consider per shard */ num_candidates?: integer - /** The percentage of vectors to explore per shard while doing knn search with bbq_disk */ + /** The percentage of vectors to explore per shard while doing knn search with bbq_disk + * @availability stack since=9.2.0 + * @availability serverless + */ visit_percentage?: float /** The final number of nearest neighbors to return as top hits */ k?: integer diff --git a/specification/_types/Retriever.ts b/specification/_types/Retriever.ts index 01860a2d6b..a9674cad46 100644 --- a/specification/_types/Retriever.ts +++ b/specification/_types/Retriever.ts @@ -124,7 +124,10 @@ export class KnnRetriever extends RetrieverBase { k: integer /** Number of nearest neighbor candidates to consider per shard. */ num_candidates: integer - /** The percentage of vectors to explore per shard while doing knn search with bbq_disk */ + /** The percentage of vectors to explore per shard while doing knn search with bbq_disk + * @availability stack since=9.2.0 + * @availability serverless + */ visit_percentage?: float /** The minimum similarity required for a document to be considered a match. */ similarity?: float