pub struct GraphSearcher<'a> { /* private fields */ }Expand description
Per-query binding of mmap-backed graph views to owned reusable scratch.
Implementations§
Source§impl<'a> GraphSearcher<'a>
impl<'a> GraphSearcher<'a>
Sourcepub fn new(
graph: GraphNodeBlocks<'a>,
rescore: &'a [f32],
scratch: &'a mut GraphSearchScratch,
) -> Result<Self, GraphSearchError>
pub fn new( graph: GraphNodeBlocks<'a>, rescore: &'a [f32], scratch: &'a mut GraphSearchScratch, ) -> Result<Self, GraphSearchError>
Validates geometry and retains the existing O(N) entry-seed discovery behavior.
Sourcepub fn discover_entry_row_ids(
graph: GraphNodeBlocks<'_>,
) -> Result<[u32; 4], GraphSearchError>
pub fn discover_entry_row_ids( graph: GraphNodeBlocks<'_>, ) -> Result<[u32; 4], GraphSearchError>
Discovers all four persisted entry seeds by validating every graph block.
Sourcepub fn with_entry_row_ids(
graph: GraphNodeBlocks<'a>,
rescore: &'a [f32],
entry_row_ids: [u32; 4],
scratch: &'a mut GraphSearchScratch,
) -> Result<Self, GraphSearchError>
pub fn with_entry_row_ids( graph: GraphNodeBlocks<'a>, rescore: &'a [f32], entry_row_ids: [u32; 4], scratch: &'a mut GraphSearchScratch, ) -> Result<Self, GraphSearchError>
Binds cached entry row ids after validating only those four graph blocks.
Sourcepub fn search(
&mut self,
request: GraphSearchRequest<'_>,
cancellation: Option<&QueryCancellation<'_>>,
) -> Result<GraphSearchResult, GraphSearchError>
pub fn search( &mut self, request: GraphSearchRequest<'_>, cancellation: Option<&QueryCancellation<'_>>, ) -> Result<GraphSearchResult, GraphSearchError>
Traverses, then exact-rescores the complete retained pool.
Sourcepub fn search_filtered(
&mut self,
request: GraphSearchRequest<'_>,
allow_list: &DocBitmap,
filtered_visited_budget: usize,
cancellation: Option<&QueryCancellation<'_>>,
) -> Result<FilteredGraphSearchOutcome, GraphSearchError>
pub fn search_filtered( &mut self, request: GraphSearchRequest<'_>, allow_list: &DocBitmap, filtered_visited_budget: usize, cancellation: Option<&QueryCancellation<'_>>, ) -> Result<FilteredGraphSearchOutcome, GraphSearchError>
Traverses every reachable node while retaining only rows in allow_list.
filtered_visited_budget is a selectivity work budget. Crossing it is a
normal disposition for the store planner to answer through its exact
allow-list branch; it is deliberately distinct from the fail-closed
unfiltered visited-cap error.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GraphSearcher<'a>
impl<'a> !Send for GraphSearcher<'a>
impl<'a> !Sync for GraphSearcher<'a>
impl<'a> !UnwindSafe for GraphSearcher<'a>
impl<'a> Freeze for GraphSearcher<'a>
impl<'a> Unpin for GraphSearcher<'a>
impl<'a> UnsafeUnpin for GraphSearcher<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more