pub struct SemanticSearchIndex { /* private fields */ }Expand description
In-memory nearest-neighbor index over semantic entities.
Implementations§
Source§impl SemanticSearchIndex
impl SemanticSearchIndex
Sourcepub fn insert(&mut self, entity: SemanticEntity)
pub fn insert(&mut self, entity: SemanticEntity)
Inserts an entity.
Sourcepub fn search(
&self,
query: &Embedding,
fusion: MultimodalFusion,
k: usize,
) -> SemanticResult<Vec<(EntityId, FusionScore)>>
pub fn search( &self, query: &Embedding, fusion: MultimodalFusion, k: usize, ) -> SemanticResult<Vec<(EntityId, FusionScore)>>
Returns top-k entity ids by fused score.
Trait Implementations§
Source§impl Clone for SemanticSearchIndex
impl Clone for SemanticSearchIndex
Source§fn clone(&self) -> SemanticSearchIndex
fn clone(&self) -> SemanticSearchIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticSearchIndex
impl Debug for SemanticSearchIndex
Source§impl Default for SemanticSearchIndex
impl Default for SemanticSearchIndex
Source§fn default() -> SemanticSearchIndex
fn default() -> SemanticSearchIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SemanticSearchIndex
impl RefUnwindSafe for SemanticSearchIndex
impl Send for SemanticSearchIndex
impl Sync for SemanticSearchIndex
impl Unpin for SemanticSearchIndex
impl UnsafeUnpin for SemanticSearchIndex
impl UnwindSafe for SemanticSearchIndex
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