diff --git a/diskann-providers/src/index/wrapped_async.rs b/diskann-providers/src/index/wrapped_async.rs index b3b07e626..8bce5eb00 100644 --- a/diskann-providers/src/index/wrapped_async.rs +++ b/diskann-providers/src/index/wrapped_async.rs @@ -8,12 +8,16 @@ use std::{num::NonZeroUsize, sync::Arc}; use diskann::{ ANNResult, graph::{ - self, ConsolidateKind, InplaceDeleteMethod, + self, ConsolidateKind, InplaceDeleteMethod, RangeSearchParams, SearchParams, glue::{ - self, AsElement, InplaceDeleteStrategy, InsertStrategy, PruneStrategy, SearchStrategy, + self, AsElement, IdIterator, InplaceDeleteStrategy, InsertStrategy, PruneStrategy, + SearchStrategy, + }, + index::{ + DegreeStats, PartitionedNeighbors, QueryLabelProvider, SearchState, SearchStats, }, - index::{DegreeStats, PartitionedNeighbors, SearchState, SearchStats}, search::Knn, + search::record::SearchRecord, search_output_buffer, }, neighbor::Neighbor, @@ -299,6 +303,32 @@ where )) } + #[allow(clippy::too_many_arguments)] + pub fn multihop_search( + &self, + strategy: &S, + context: &DP::Context, + query: &T, + search_params: &SearchParams, + output: &mut OB, + query_label_evaluator: &dyn QueryLabelProvider, + ) -> ANNResult + where + T: Sync + ?Sized, + S: SearchStrategy, + O: Send, + OB: search_output_buffer::SearchOutputBuffer + Send, + { + self.handle.block_on(self.inner.multihop_search( + strategy, + context, + query, + search_params, + output, + query_label_evaluator, + )) + } + pub fn count_reachable_nodes( &self, start_points: &[DP::InternalId],