pub struct VectorJoinOp {Show 13 fields
pub input: Box<LogicalOperator>,
pub left_vector_variable: Option<String>,
pub left_property: Option<String>,
pub query_vector: LogicalExpression,
pub right_variable: String,
pub right_property: String,
pub right_label: Option<String>,
pub index_name: Option<String>,
pub k: usize,
pub metric: Option<VectorMetric>,
pub min_similarity: Option<f32>,
pub max_distance: Option<f32>,
pub score_variable: Option<String>,
}Expand description
Join graph patterns with vector similarity search.
This operator takes entities from the left input and computes vector similarity against a query vector, outputting (entity, distance) pairs.
§Use Cases
- Hybrid graph + vector queries: Find similar nodes after graph traversal
- Aggregated embeddings: Use AVG(embeddings) as query vector
- Filtering by similarity: Join with threshold-based filtering
§Example
// Find movies similar to what the user liked
MATCH (u:User {id: $user_id})-[:LIKED]->(liked:Movie)
WITH avg(liked.embedding) AS user_taste
VECTOR JOIN (m:Movie) ON m.embedding
WHERE vector_similarity(m.embedding, user_taste) > 0.7
RETURN m.titleFields§
§input: Box<LogicalOperator>Input operator providing entities to match against.
left_vector_variable: Option<String>Variable from input to extract vectors from (for entity-to-entity similarity).
If None, uses query_vector directly.
left_property: Option<String>Property containing the left vector (used with left_vector_variable).
query_vector: LogicalExpressionThe query vector expression (constant or computed).
right_variable: StringVariable name to bind the right-side matching entities.
right_property: StringProperty containing the right-side vector embeddings.
right_label: Option<String>Optional label filter for right-side entities.
index_name: Option<String>Name of vector index on right side (None = brute-force).
k: usizeNumber of nearest neighbors per left-side entity.
metric: Option<VectorMetric>Distance metric.
min_similarity: Option<f32>Minimum similarity threshold.
max_distance: Option<f32>Maximum distance threshold.
score_variable: Option<String>Variable to bind the distance/similarity score.
Trait Implementations§
Source§impl Clone for VectorJoinOp
impl Clone for VectorJoinOp
Source§fn clone(&self) -> VectorJoinOp
fn clone(&self) -> VectorJoinOp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VectorJoinOp
impl RefUnwindSafe for VectorJoinOp
impl Send for VectorJoinOp
impl Sync for VectorJoinOp
impl Unpin for VectorJoinOp
impl UnwindSafe for VectorJoinOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 more