pub struct SearchQueryBuilder { /* private fields */ }Expand description
Builder for search queries.
Implementations§
Source§impl SearchQueryBuilder
impl SearchQueryBuilder
Sourcepub fn columns(
self,
columns: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn columns( self, columns: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple columns to search.
Sourcepub fn mode(self, mode: SearchMode) -> Self
pub fn mode(self, mode: SearchMode) -> Self
Set the search mode.
Sourcepub fn language(self, language: SearchLanguage) -> Self
pub fn language(self, language: SearchLanguage) -> Self
Set the search language.
Sourcepub fn with_ranking(self) -> Self
pub fn with_ranking(self) -> Self
Enable ranking with default options.
Sourcepub fn ranking(self, options: RankingOptions) -> Self
pub fn ranking(self, options: RankingOptions) -> Self
Configure ranking options.
Sourcepub fn with_highlight(self) -> Self
pub fn with_highlight(self) -> Self
Enable highlighting with default options.
Sourcepub fn highlight(self, options: HighlightOptions) -> Self
pub fn highlight(self, options: HighlightOptions) -> Self
Configure highlighting options.
Sourcepub fn with_fuzzy(self) -> Self
pub fn with_fuzzy(self) -> Self
Enable fuzzy matching with default options.
Sourcepub fn fuzzy(self, options: FuzzyOptions) -> Self
pub fn fuzzy(self, options: FuzzyOptions) -> Self
Configure fuzzy search options.
Sourcepub fn min_word_length(self, length: u32) -> Self
pub fn min_word_length(self, length: u32) -> Self
Set minimum word length.
Sourcepub fn filter(self, field: impl Into<String>, value: impl Into<String>) -> Self
pub fn filter(self, field: impl Into<String>, value: impl Into<String>) -> Self
Add a filter for faceted search.
Sourcepub fn build(self) -> SearchQuery
pub fn build(self) -> SearchQuery
Build the search query.
Trait Implementations§
Source§impl Clone for SearchQueryBuilder
impl Clone for SearchQueryBuilder
Source§fn clone(&self) -> SearchQueryBuilder
fn clone(&self) -> SearchQueryBuilder
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 moreAuto Trait Implementations§
impl Freeze for SearchQueryBuilder
impl RefUnwindSafe for SearchQueryBuilder
impl Send for SearchQueryBuilder
impl Sync for SearchQueryBuilder
impl Unpin 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