pub struct SemanticSearch { /* private fields */ }Expand description
Semantic search engine for graph queries
Implementations§
Source§impl SemanticSearch
impl SemanticSearch
Sourcepub fn new(index: HybridIndex, config: SemanticSearchConfig) -> Self
pub fn new(index: HybridIndex, config: SemanticSearchConfig) -> Self
Create a new semantic search engine
Sourcepub fn find_similar_nodes(
&self,
query: &[f32],
k: usize,
) -> Result<Vec<SemanticMatch>>
pub fn find_similar_nodes( &self, query: &[f32], k: usize, ) -> Result<Vec<SemanticMatch>>
Find nodes semantically similar to query embedding
Sourcepub fn find_semantic_paths(
&self,
start_node: &NodeId,
query: &[f32],
max_paths: usize,
) -> Result<Vec<SemanticPath>>
pub fn find_semantic_paths( &self, start_node: &NodeId, query: &[f32], max_paths: usize, ) -> Result<Vec<SemanticPath>>
Find semantic paths through the graph
Sourcepub fn detect_clusters(
&self,
nodes: &[NodeId],
min_cluster_size: usize,
) -> Result<Vec<ClusterResult>>
pub fn detect_clusters( &self, nodes: &[NodeId], min_cluster_size: usize, ) -> Result<Vec<ClusterResult>>
Detect clusters using embeddings
Find semantically related edges
Auto Trait Implementations§
impl Freeze for SemanticSearch
impl !RefUnwindSafe for SemanticSearch
impl Send for SemanticSearch
impl Sync for SemanticSearch
impl Unpin for SemanticSearch
impl !UnwindSafe for SemanticSearch
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request