#[non_exhaustive]pub struct KnnQuery {
pub boost: Option<f32>,
pub field: String,
pub k: i64,
pub vector: Option<Vec<f32>>,
pub vector_base64: Option<String>,
pub filter: Option<Query>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.boost: Option<f32>§field: String§k: i64§vector: Option<Vec<f32>>§vector_base64: Option<String>§filter: Option<Query>Implementations§
Source§impl KnnQuery
impl KnnQuery
pub fn new(field: impl Into<String>, k: impl Into<i64>) -> Self
pub fn boost(self, boost: impl Into<Option<f32>>) -> Self
pub fn k(self, k: impl Into<i64>) -> Self
pub fn vector(self, vector: impl Into<Option<Vec<f32>>>) -> Self
pub fn vector_base64(self, vector_base64: impl Into<Option<String>>) -> Self
pub fn filter(self, filter: impl Into<Option<Query>>) -> Self
Trait Implementations§
impl StructuralPartialEq for KnnQuery
Auto Trait Implementations§
impl Freeze for KnnQuery
impl RefUnwindSafe for KnnQuery
impl Send for KnnQuery
impl Sync for KnnQuery
impl Unpin for KnnQuery
impl UnsafeUnpin for KnnQuery
impl UnwindSafe for KnnQuery
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