pub struct BatchQueryItem {
pub id: Option<String>,
pub vector: Vec<f32>,
pub top_k: u32,
pub filter: Option<Value>,
pub include_metadata: bool,
pub consistency: ReadConsistency,
pub staleness_config: Option<StalenessConfig>,
}Expand description
A single query within a batch request
Fields§
§id: Option<String>Unique identifier for this query within the batch
vector: Vec<f32>The query vector
top_k: u32Number of results to return
filter: Option<Value>Optional filter expression
include_metadata: boolWhether to include metadata in results
consistency: ReadConsistencyRead consistency level
staleness_config: Option<StalenessConfig>Staleness configuration for bounded staleness reads
Implementations§
Source§impl BatchQueryItem
impl BatchQueryItem
Sourcepub fn with_filter(self, filter: Value) -> Self
pub fn with_filter(self, filter: Value) -> Self
Add a filter to the query
Sourcepub fn include_metadata(self, include: bool) -> Self
pub fn include_metadata(self, include: bool) -> Self
Set whether to include metadata
Sourcepub fn with_consistency(self, consistency: ReadConsistency) -> Self
pub fn with_consistency(self, consistency: ReadConsistency) -> Self
Set read consistency level
Sourcepub fn with_bounded_staleness(self, max_staleness_ms: u64) -> Self
pub fn with_bounded_staleness(self, max_staleness_ms: u64) -> Self
Set bounded staleness with max staleness in ms
Trait Implementations§
Source§impl Clone for BatchQueryItem
impl Clone for BatchQueryItem
Source§fn clone(&self) -> BatchQueryItem
fn clone(&self) -> BatchQueryItem
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 moreSource§impl Debug for BatchQueryItem
impl Debug for BatchQueryItem
Source§impl<'de> Deserialize<'de> for BatchQueryItem
impl<'de> Deserialize<'de> for BatchQueryItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BatchQueryItem
impl RefUnwindSafe for BatchQueryItem
impl Send for BatchQueryItem
impl Sync for BatchQueryItem
impl Unpin for BatchQueryItem
impl UnsafeUnpin for BatchQueryItem
impl UnwindSafe for BatchQueryItem
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