pub struct SearchQueryBuilder { /* private fields */ }Expand description
Fluent builder matching the official SDK’s naming.
A builder can construct a dense-vector, binary-vector, or pure FTS query.
The routes are mutually exclusive, as are the FTS query_string and
match_string forms.
Implementations§
Source§impl SearchQueryBuilder
impl SearchQueryBuilder
pub fn new() -> Self
pub fn field_name(self, name: &str) -> Self
pub fn vector(self, vector: &[f32]) -> Self
pub fn binary_vector(self, vector: &[u8]) -> Self
pub fn topk(self, topk: i32) -> Self
pub fn filter(self, filter: &str) -> Self
pub fn include_vector(self, include: bool) -> Self
pub fn include_doc_id(self, include: bool) -> Self
pub fn output_fields(self, fields: &[&str]) -> Self
pub fn fts_query_string(self, query: &str) -> Self
pub fn fts_match_string(self, query: &str) -> Self
Sourcepub fn build(self) -> Result<SearchQuery>
pub fn build(self) -> Result<SearchQuery>
Validates the selected route and creates the immutable query payload.
Trait Implementations§
Source§impl Clone for SearchQueryBuilder
impl Clone for SearchQueryBuilder
Source§impl Debug for SearchQueryBuilder
impl Debug for SearchQueryBuilder
Auto Trait Implementations§
impl Freeze for SearchQueryBuilder
impl RefUnwindSafe for SearchQueryBuilder
impl Send for SearchQueryBuilder
impl Sync for SearchQueryBuilder
impl Unpin for SearchQueryBuilder
impl UnsafeUnpin for SearchQueryBuilder
impl UnwindSafe for SearchQueryBuilder
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,
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