From 223d2905211e7ebf59e58e34d1c1b8066e5c193b Mon Sep 17 00:00:00 2001 From: B Harsha Kashyap Date: Thu, 5 Mar 2026 14:24:47 +0000 Subject: [PATCH] Initial draft --- diskann-providers/src/index/wrapped_async.rs | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/diskann-providers/src/index/wrapped_async.rs b/diskann-providers/src/index/wrapped_async.rs index b3b07e626..40c16a6c2 100644 --- a/diskann-providers/src/index/wrapped_async.rs +++ b/diskann-providers/src/index/wrapped_async.rs @@ -13,7 +13,7 @@ use diskann::{ self, AsElement, InplaceDeleteStrategy, InsertStrategy, PruneStrategy, SearchStrategy, }, index::{DegreeStats, PartitionedNeighbors, SearchState, SearchStats}, - search::Knn, + search::{self, Knn, MultihopSearch}, search_output_buffer, }, neighbor::Neighbor, @@ -280,6 +280,26 @@ where ) } + pub fn multihop_search<'q, S, T, O, OB>( + &self, + strategy: &S, + context: &DP::Context, + query: &T, + search_params: MultihopSearch<'q, DP::InternalId>, + output: &mut OB, + ) -> ANNResult + where + T: Sync + ?Sized, + S: SearchStrategy, + O: Send, + OB: search_output_buffer::SearchOutputBuffer + Send, + { + self.handle.block_on( + self.inner + .search(search_params, strategy, context, query, output), + ) + } + pub fn next_search_results( &self, context: &DP::Context,