pub trait VectorIndex: Send + Sync {
// Required methods
fn model(&self) -> &str;
fn dim(&self) -> u32;
fn search(&self, query: &[f32], k: usize) -> Result<Vec<VectorHit>, Error>;
fn len(&self) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Read-only approximate-nearest-neighbours surface for node embeddings.
Implementations bind to a single (model, dim) at build time.
search returns up to k hits in descending score order, with
ties broken by NodeId ASC for byte-stable replay.