pub struct SemanticGraphSearch<'a> {
pub graph: &'a str,
pub start_vertex: VertexId,
pub label: Option<&'a str>,
pub max_hops: u32,
pub query_vector: Vec<f64>,
pub vector_field: String,
pub threshold: f64,
}Expand description
Traverse followed by a vector-similarity filter: keep only the
vertices whose vector_field similarity to query_vector clears
threshold. The retained entries’ scores are the cosine values.
Fields§
§graph: &'a str§start_vertex: VertexId§label: Option<&'a str>§max_hops: u32§query_vector: Vec<f64>§vector_field: String§threshold: f64Implementations§
Source§impl<'a> SemanticGraphSearch<'a>
impl<'a> SemanticGraphSearch<'a>
pub fn new( graph: &'a str, start_vertex: VertexId, query_vector: Vec<f64>, ) -> Self
pub fn label(self, label: &'a str) -> Self
pub fn max_hops(self, hops: u32) -> Self
pub fn vector_field(self, name: impl Into<String>) -> Self
pub fn threshold(self, t: f64) -> Self
pub fn execute<G: GraphStore>( &self, store: &G, ) -> CrossParadigmResult<GraphPostingList>
Auto Trait Implementations§
impl<'a> Freeze for SemanticGraphSearch<'a>
impl<'a> RefUnwindSafe for SemanticGraphSearch<'a>
impl<'a> Send for SemanticGraphSearch<'a>
impl<'a> Sync for SemanticGraphSearch<'a>
impl<'a> Unpin for SemanticGraphSearch<'a>
impl<'a> UnsafeUnpin for SemanticGraphSearch<'a>
impl<'a> UnwindSafe for SemanticGraphSearch<'a>
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