pub struct HybridStore { /* private fields */ }Expand description
Executes hybrid graph + vector queries.
Implementations§
Source§impl HybridStore
impl HybridStore
Sourcepub fn query(
&self,
q: HybridQuery<'_>,
col: &Collection,
) -> Result<Vec<HybridResult>>
pub fn query( &self, q: HybridQuery<'_>, col: &Collection, ) -> Result<Vec<HybridResult>>
Run a hybrid graph + vector query.
The algorithm proceeds in three stages:
- Graph traversal — walks the memory graph from
q.anchor_nodeup toq.graph_depthhops, recording the maximum edge weight seen for each reachable node. - Vector search — retrieves the top
q.top_k × 20approximate nearest neighbours from the named collection. - Score blending — for each candidate, computes
rank = q.alpha × vec_similarity + (1 − q.alpha) × graph_weight, then returns the topq.top_kresults sorted by rank descending.
Auto Trait Implementations§
impl Freeze for HybridStore
impl RefUnwindSafe for HybridStore
impl Send for HybridStore
impl Sync for HybridStore
impl Unpin for HybridStore
impl UnsafeUnpin for HybridStore
impl UnwindSafe for HybridStore
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