pub struct SubQuery {
pub field_name: Option<String>,
pub vector: Option<Vec<f32>>,
pub binary_vector: Option<Vec<u8>>,
pub sparse_vector: Option<Vec<(u32, f32)>>,
pub fts: Option<Fts>,
pub num_candidates: i32,
pub params: Map<String, Value>,
}Expand description
A branch in a MultiQuery.
Fields§
§field_name: Option<String>§vector: Option<Vec<f32>>§binary_vector: Option<Vec<u8>>§sparse_vector: Option<Vec<(u32, f32)>>§fts: Option<Fts>§num_candidates: i32§params: Map<String, Value>Implementations§
Source§impl SubQuery
impl SubQuery
pub fn new() -> Result<Self>
pub fn set_num_candidates(&mut self, n: i32) -> Result<()>
pub fn num_candidates(&self) -> i32
pub fn set_field_name(&mut self, name: &str) -> Result<()>
pub fn set_query_vector(&mut self, data: &[f32]) -> Result<()>
pub fn set_binary_vector(&mut self, data: &[u8]) -> Result<()>
pub fn set_sparse_vector( &mut self, indices: &[u32], values: &[f32], ) -> Result<()>
pub fn set_sparse_indices(&mut self, indices: &[u32]) -> Result<()>
pub fn set_sparse_values(&mut self, values: &[f32]) -> Result<()>
pub fn set_hnsw_params(&mut self, params: HnswQueryParams) -> Result<()>
pub fn set_ivf_params(&mut self, params: IvfQueryParams) -> Result<()>
pub fn set_ivf_rabitq_params( &mut self, params: IvfRabitqQueryParams, ) -> Result<()>
pub fn set_flat_params(&mut self, _params: FlatQueryParams) -> Result<()>
pub fn set_diskann_params(&mut self, params: DiskannQueryParams) -> Result<()>
pub fn set_fts_params(&mut self, params: FtsQueryParams) -> Result<()>
pub fn set_fts(&mut self, fts: &Fts) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SubQuery
impl<'de> Deserialize<'de> for SubQuery
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
impl StructuralPartialEq for SubQuery
Auto Trait Implementations§
impl Freeze for SubQuery
impl RefUnwindSafe for SubQuery
impl Send for SubQuery
impl Sync for SubQuery
impl Unpin for SubQuery
impl UnsafeUnpin for SubQuery
impl UnwindSafe for SubQuery
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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