Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions diskann-providers/src/index/wrapped_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -299,6 +303,32 @@ where
))
}

#[allow(clippy::too_many_arguments)]
pub fn multihop_search<S, T, O, OB>(
&self,
strategy: &S,
context: &DP::Context,
query: &T,
search_params: &SearchParams,
output: &mut OB,
query_label_evaluator: &dyn QueryLabelProvider<DP::InternalId>,
) -> ANNResult<SearchStats>
where
T: Sync + ?Sized,
S: SearchStrategy<DP, T, O>,
O: Send,
OB: search_output_buffer::SearchOutputBuffer<O> + Send,
{
self.handle.block_on(self.inner.multihop_search(
strategy,
context,
query,
search_params,
output,
query_label_evaluator,
))
}

pub fn count_reachable_nodes<NA>(
&self,
start_points: &[DP::InternalId],
Expand Down
Loading