pub struct MultiVectorSearchRequest {Show 14 fields
pub positive_vectors: Vec<Vec<f32>>,
pub positive_weights: Option<Vec<f32>>,
pub negative_vectors: Option<Vec<Vec<f32>>>,
pub negative_weights: Option<Vec<f32>>,
pub top_k: u32,
pub distance_metric: DistanceMetric,
pub score_threshold: Option<f32>,
pub enable_mmr: bool,
pub mmr_lambda: f32,
pub include_metadata: bool,
pub include_vectors: bool,
pub filter: Option<Value>,
pub consistency: ReadConsistency,
pub staleness_config: Option<StalenessConfig>,
}Expand description
Request for multi-vector search with positive and negative vectors
Fields§
§positive_vectors: Vec<Vec<f32>>Positive vectors to search towards (required, at least one)
positive_weights: Option<Vec<f32>>Weights for positive vectors (optional, defaults to equal weights)
negative_vectors: Option<Vec<Vec<f32>>>Negative vectors to search away from (optional)
negative_weights: Option<Vec<f32>>Weights for negative vectors (optional, defaults to equal weights)
top_k: u32Number of results to return
distance_metric: DistanceMetricDistance metric to use
score_threshold: Option<f32>Minimum score threshold
enable_mmr: boolEnable MMR (Maximal Marginal Relevance) for diversity
mmr_lambda: f32Lambda parameter for MMR (0 = max diversity, 1 = max relevance)
include_metadata: boolInclude metadata in results
include_vectors: boolInclude vectors in results
filter: Option<Value>Optional metadata filter
consistency: ReadConsistencyRead consistency level
staleness_config: Option<StalenessConfig>Staleness configuration for bounded staleness reads
Implementations§
Source§impl MultiVectorSearchRequest
impl MultiVectorSearchRequest
Sourcepub fn new(positive_vectors: Vec<Vec<f32>>) -> Self
pub fn new(positive_vectors: Vec<Vec<f32>>) -> Self
Create a new multi-vector search request with positive vectors
Sourcepub fn with_top_k(self, top_k: u32) -> Self
pub fn with_top_k(self, top_k: u32) -> Self
Set the number of results to return
Sourcepub fn with_positive_weights(self, weights: Vec<f32>) -> Self
pub fn with_positive_weights(self, weights: Vec<f32>) -> Self
Add weights for positive vectors
Sourcepub fn with_negative_vectors(self, vectors: Vec<Vec<f32>>) -> Self
pub fn with_negative_vectors(self, vectors: Vec<Vec<f32>>) -> Self
Add negative vectors to search away from
Sourcepub fn with_negative_weights(self, weights: Vec<f32>) -> Self
pub fn with_negative_weights(self, weights: Vec<f32>) -> Self
Add weights for negative vectors
Sourcepub fn with_distance_metric(self, metric: DistanceMetric) -> Self
pub fn with_distance_metric(self, metric: DistanceMetric) -> Self
Set distance metric
Sourcepub fn with_score_threshold(self, threshold: f32) -> Self
pub fn with_score_threshold(self, threshold: f32) -> Self
Set minimum score threshold
Sourcepub fn include_metadata(self, include: bool) -> Self
pub fn include_metadata(self, include: bool) -> Self
Set whether to include metadata
Sourcepub fn include_vectors(self, include: bool) -> Self
pub fn include_vectors(self, include: bool) -> Self
Set whether to include vectors
Sourcepub fn with_filter(self, filter: Value) -> Self
pub fn with_filter(self, filter: Value) -> Self
Add a filter
Sourcepub fn with_consistency(self, consistency: ReadConsistency) -> Self
pub fn with_consistency(self, consistency: ReadConsistency) -> Self
Set read consistency level
Trait Implementations§
Source§impl Clone for MultiVectorSearchRequest
impl Clone for MultiVectorSearchRequest
Source§fn clone(&self) -> MultiVectorSearchRequest
fn clone(&self) -> MultiVectorSearchRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more