Skip to main content

GraphSearcher

Struct GraphSearcher 

Source
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>

Source

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.

Source

pub fn discover_entry_row_ids( graph: GraphNodeBlocks<'_>, ) -> Result<[u32; 4], GraphSearchError>

Discovers all four persisted entry seeds by validating every graph block.

Source

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.

Source

pub fn search( &mut self, request: GraphSearchRequest<'_>, cancellation: Option<&QueryCancellation<'_>>, ) -> Result<GraphSearchResult, GraphSearchError>

Traverses, then exact-rescores the complete retained pool.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.