pub struct VectorRangeQuery<'a> { /* private fields */ }Expand description
Vector range query.
Implementations§
Source§impl<'a> VectorRangeQuery<'a>
impl<'a> VectorRangeQuery<'a>
Sourcepub fn new(
vector: Vector<'a>,
vector_field_name: impl Into<String>,
distance_threshold: f32,
) -> Self
pub fn new( vector: Vector<'a>, vector_field_name: impl Into<String>, distance_threshold: f32, ) -> Self
Creates a vector range query.
Sourcepub fn with_filter(self, filter_expression: FilterExpression) -> Self
pub fn with_filter(self, filter_expression: FilterExpression) -> Self
Attaches a filter expression.
Sourcepub fn set_filter(&mut self, filter_expression: FilterExpression)
pub fn set_filter(&mut self, filter_expression: FilterExpression)
Replaces the filter expression in place.
Sourcepub fn distance_threshold(&self) -> f32
pub fn distance_threshold(&self) -> f32
Returns the active distance threshold.
Sourcepub fn set_distance_threshold(&mut self, distance_threshold: f32)
pub fn set_distance_threshold(&mut self, distance_threshold: f32)
Updates the distance threshold in place.
Sourcepub fn with_epsilon(self, epsilon: f64) -> Self
pub fn with_epsilon(self, epsilon: f64) -> Self
Sets the epsilon parameter for approximate range search.
Sourcepub fn set_epsilon(&mut self, epsilon: f64)
pub fn set_epsilon(&mut self, epsilon: f64)
Replaces the epsilon parameter in place.
Sourcepub fn with_hybrid_policy(self, policy: HybridPolicy) -> Self
pub fn with_hybrid_policy(self, policy: HybridPolicy) -> Self
Sets the hybrid search policy.
Sourcepub fn set_hybrid_policy(&mut self, policy: HybridPolicy)
pub fn set_hybrid_policy(&mut self, policy: HybridPolicy)
Replaces the hybrid search policy in place.
Sourcepub fn hybrid_policy(&self) -> Option<HybridPolicy>
pub fn hybrid_policy(&self) -> Option<HybridPolicy>
Returns the current hybrid policy setting.
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Sets the batch size for BATCHES hybrid search policy.
Sourcepub fn set_batch_size(&mut self, batch_size: usize)
pub fn set_batch_size(&mut self, batch_size: usize)
Replaces the batch size in place.
Sourcepub fn batch_size(&self) -> Option<usize>
pub fn batch_size(&self) -> Option<usize>
Returns the current batch size setting.
Sourcepub fn with_search_window_size(self, size: usize) -> Self
pub fn with_search_window_size(self, size: usize) -> Self
Sets the search window size (SVS-VAMANA indexes).
Sourcepub fn set_search_window_size(&mut self, size: usize)
pub fn set_search_window_size(&mut self, size: usize)
Replaces the search window size in place.
Sourcepub fn search_window_size(&self) -> Option<usize>
pub fn search_window_size(&self) -> Option<usize>
Returns the current search window size setting.
Sourcepub fn with_use_search_history(self, mode: SearchHistoryMode) -> Self
pub fn with_use_search_history(self, mode: SearchHistoryMode) -> Self
Sets the search history mode (SVS-VAMANA indexes).
Sourcepub fn set_use_search_history(&mut self, mode: SearchHistoryMode)
pub fn set_use_search_history(&mut self, mode: SearchHistoryMode)
Replaces the search history mode in place.
Sourcepub fn use_search_history(&self) -> Option<SearchHistoryMode>
pub fn use_search_history(&self) -> Option<SearchHistoryMode>
Returns the current search history mode.
Sourcepub fn with_search_buffer_capacity(self, capacity: usize) -> Self
pub fn with_search_buffer_capacity(self, capacity: usize) -> Self
Sets the search buffer capacity (SVS-VAMANA indexes).
Sourcepub fn set_search_buffer_capacity(&mut self, capacity: usize)
pub fn set_search_buffer_capacity(&mut self, capacity: usize)
Replaces the search buffer capacity in place.
Sourcepub fn search_buffer_capacity(&self) -> Option<usize>
pub fn search_buffer_capacity(&self) -> Option<usize>
Returns the current search buffer capacity.
Sourcepub fn with_return_fields<I, S>(self, return_fields: I) -> Self
pub fn with_return_fields<I, S>(self, return_fields: I) -> Self
Replaces the return field list.
Sourcepub fn sort_by(self, field: impl Into<String>, direction: SortDirection) -> Self
pub fn sort_by(self, field: impl Into<String>, direction: SortDirection) -> Self
Sets the sort field and direction.
Sourcepub fn with_dialect(self, dialect: u32) -> Self
pub fn with_dialect(self, dialect: u32) -> Self
Sets the query dialect.
Trait Implementations§
Source§impl<'a> Clone for VectorRangeQuery<'a>
impl<'a> Clone for VectorRangeQuery<'a>
Source§fn clone(&self) -> VectorRangeQuery<'a>
fn clone(&self) -> VectorRangeQuery<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for VectorRangeQuery<'a>
impl<'a> Debug for VectorRangeQuery<'a>
Source§impl PageableQuery for VectorRangeQuery<'_>
impl PageableQuery for VectorRangeQuery<'_>
Source§impl QueryString for VectorRangeQuery<'_>
impl QueryString for VectorRangeQuery<'_>
Source§fn to_redis_query(&self) -> String
fn to_redis_query(&self) -> String
Source§fn params(&self) -> Vec<QueryParam>
fn params(&self) -> Vec<QueryParam>
PARAMS.Source§fn return_fields(&self) -> Vec<String>
fn return_fields(&self) -> Vec<String>
Source§fn limit(&self) -> Option<QueryLimit>
fn limit(&self) -> Option<QueryLimit>
Source§fn render(&self) -> QueryRender
fn render(&self) -> QueryRender
Source§fn no_content(&self) -> bool
fn no_content(&self) -> bool
NOCONTENT.Source§fn should_unpack_json(&self) -> bool
fn should_unpack_json(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for VectorRangeQuery<'a>
impl<'a> RefUnwindSafe for VectorRangeQuery<'a>
impl<'a> Send for VectorRangeQuery<'a>
impl<'a> Sync for VectorRangeQuery<'a>
impl<'a> Unpin for VectorRangeQuery<'a>
impl<'a> UnsafeUnpin for VectorRangeQuery<'a>
impl<'a> UnwindSafe for VectorRangeQuery<'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
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