pub struct NebulaIndex { /* private fields */ }Implementations§
Source§impl NebulaIndex
impl NebulaIndex
pub fn new(dim: usize, top_k: usize, existing: Vec<Partition>) -> Self
Sourcepub fn coarse_candidates(&self, query: &[f32]) -> Vec<String>
pub fn coarse_candidates(&self, query: &[f32]) -> Vec<String>
粗筛:找最近top_k个分区,返回候选ID
pub fn add_to_partition(&self, id: &str, vec: &[f32])
pub fn remove_from_partitions(&self, id: &str)
pub fn snapshot(&self) -> Vec<Partition>
pub fn partition_count(&self) -> usize
Auto Trait Implementations§
impl !Freeze for NebulaIndex
impl !RefUnwindSafe for NebulaIndex
impl Send for NebulaIndex
impl Sync for NebulaIndex
impl Unpin for NebulaIndex
impl UnsafeUnpin for NebulaIndex
impl UnwindSafe for NebulaIndex
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