From c8b473fc17fc30a343efcbf3779e542182e14b3e Mon Sep 17 00:00:00 2001 From: John Wagster Date: Thu, 23 Oct 2025 10:01:27 -0400 Subject: [PATCH] Adding visit_percentage for the new DiskBBQ (#5495) (cherry picked from commit 9fc82b02f8f8e4d524d9c8565a754d764fbb62cc) --- specification/_types/Knn.ts | 10 ++++++++++ specification/_types/Retriever.ts | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/specification/_types/Knn.ts b/specification/_types/Knn.ts index f5fef4666a..541411301f 100644 --- a/specification/_types/Knn.ts +++ b/specification/_types/Knn.ts @@ -43,6 +43,11 @@ 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 + * @availability stack since=9.2.0 + * @availability serverless + */ + visit_percentage?: float /** Boost value to apply to kNN scores */ boost?: float /** Filters for the kNN search query */ @@ -73,6 +78,11 @@ 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 + * @availability stack since=9.2.0 + * @availability serverless + */ + 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..a9674cad46 100644 --- a/specification/_types/Retriever.ts +++ b/specification/_types/Retriever.ts @@ -124,6 +124,11 @@ 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 + * @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 /** Apply oversampling and rescoring to quantized vectors