pub struct VectorScanOp {
pub variable: String,
pub index_name: Option<String>,
pub property: String,
pub label: Option<String>,
pub query_vector: LogicalExpression,
pub k: usize,
pub metric: Option<VectorMetric>,
pub min_similarity: Option<f32>,
pub max_distance: Option<f32>,
pub input: Option<Box<LogicalOperator>>,
}Expand description
Vector similarity scan operation.
Performs approximate nearest neighbor search using a vector index (HNSW) or brute-force search for small datasets. Returns nodes/edges whose embeddings are similar to the query vector.
§Example GQL
MATCH (m:Movie)
WHERE vector_similarity(m.embedding, $query_vector) > 0.8
RETURN m.titleFields§
§variable: StringVariable name to bind matching entities to.
index_name: Option<String>Name of the vector index to use (None = brute-force).
property: StringProperty containing the vector embedding.
label: Option<String>Optional label filter (scan only nodes with this label).
query_vector: LogicalExpressionThe query vector expression.
k: usizeNumber of nearest neighbors to return.
metric: Option<VectorMetric>Distance metric (None = use index default, typically cosine).
min_similarity: Option<f32>Minimum similarity threshold (filters results below this).
max_distance: Option<f32>Maximum distance threshold (filters results above this).
input: Option<Box<LogicalOperator>>Input operator (for hybrid queries combining graph + vector).
Trait Implementations§
Source§impl Clone for VectorScanOp
impl Clone for VectorScanOp
Source§fn clone(&self) -> VectorScanOp
fn clone(&self) -> VectorScanOp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VectorScanOp
impl RefUnwindSafe for VectorScanOp
impl Send for VectorScanOp
impl Sync for VectorScanOp
impl Unpin for VectorScanOp
impl UnsafeUnpin for VectorScanOp
impl UnwindSafe for VectorScanOp
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> 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>
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 more