pub struct RdfVectorIntegration { /* private fields */ }Expand description
RDF-Vector integration engine
Implementations§
Source§impl RdfVectorIntegration
impl RdfVectorIntegration
Sourcepub fn new(
config: RdfVectorConfig,
vector_store: Arc<RwLock<dyn VectorStoreTrait>>,
) -> Self
pub fn new( config: RdfVectorConfig, vector_store: Arc<RwLock<dyn VectorStoreTrait>>, ) -> Self
Create a new RDF-vector integration instance
Sourcepub fn register_term(
&self,
term: Term,
vector: Vector,
graph_context: Option<GraphName>,
) -> Result<VectorId>
pub fn register_term( &self, term: Term, vector: Vector, graph_context: Option<GraphName>, ) -> Result<VectorId>
Register an RDF term with vector representation
Sourcepub fn find_similar_terms(
&self,
query_term: &Term,
limit: usize,
threshold: Option<f32>,
graph_context: Option<&GraphName>,
) -> Result<Vec<RdfVectorSearchResult>>
pub fn find_similar_terms( &self, query_term: &Term, limit: usize, threshold: Option<f32>, graph_context: Option<&GraphName>, ) -> Result<Vec<RdfVectorSearchResult>>
Find similar RDF terms using vector similarity
Sourcepub fn search_by_text(
&self,
query_text: &str,
limit: usize,
threshold: Option<f32>,
graph_context: Option<&GraphName>,
) -> Result<Vec<RdfVectorSearchResult>>
pub fn search_by_text( &self, query_text: &str, limit: usize, threshold: Option<f32>, graph_context: Option<&GraphName>, ) -> Result<Vec<RdfVectorSearchResult>>
Search for terms by text content with RDF-aware processing
Sourcepub fn get_vector_id(&self, term: &Term) -> Result<Option<VectorId>>
pub fn get_vector_id(&self, term: &Term) -> Result<Option<VectorId>>
Get vector ID for an RDF term
Sourcepub fn get_term(&self, vector_id: VectorId) -> Result<Option<Term>>
pub fn get_term(&self, vector_id: VectorId) -> Result<Option<Term>>
Get RDF term for a vector ID
Sourcepub fn register_namespace(&self, prefix: String, uri: String) -> Result<()>
pub fn register_namespace(&self, prefix: String, uri: String) -> Result<()>
Register a namespace prefix
Sourcepub fn get_statistics(&self) -> RdfIntegrationStats
pub fn get_statistics(&self) -> RdfIntegrationStats
Get statistics about the RDF-vector integration
Auto Trait Implementations§
impl Freeze for RdfVectorIntegration
impl RefUnwindSafe for RdfVectorIntegration
impl Send for RdfVectorIntegration
impl Sync for RdfVectorIntegration
impl Unpin for RdfVectorIntegration
impl UnwindSafe for RdfVectorIntegration
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.