pub struct AtlasSearchQuery {
pub query: String,
pub path: Vec<String>,
pub fuzzy: Option<FuzzyConfig>,
pub score: Option<ScoreConfig>,
pub highlight: Option<HighlightConfig>,
}Expand description
Atlas Search query builder.
Fields§
§query: StringSearch text.
path: Vec<String>Fields to search.
fuzzy: Option<FuzzyConfig>Fuzzy options.
score: Option<ScoreConfig>Score options.
highlight: Option<HighlightConfig>Highlight options.
Implementations§
Source§impl AtlasSearchQuery
impl AtlasSearchQuery
Sourcepub fn paths(self, paths: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn paths(self, paths: impl IntoIterator<Item = impl Into<String>>) -> Self
Add multiple fields to search.
Sourcepub fn fuzzy(self, config: FuzzyConfig) -> Self
pub fn fuzzy(self, config: FuzzyConfig) -> Self
Enable fuzzy matching.
Sourcepub fn to_search_stage(&self) -> Value
pub fn to_search_stage(&self) -> Value
Build the $search aggregation stage.
Sourcepub fn to_pipeline(&self) -> Vec<Value>
pub fn to_pipeline(&self) -> Vec<Value>
Build the aggregation pipeline for search.
Trait Implementations§
Source§impl Clone for AtlasSearchQuery
impl Clone for AtlasSearchQuery
Source§fn clone(&self) -> AtlasSearchQuery
fn clone(&self) -> AtlasSearchQuery
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 AtlasSearchQuery
impl Debug for AtlasSearchQuery
Source§impl Default for AtlasSearchQuery
impl Default for AtlasSearchQuery
Source§fn default() -> AtlasSearchQuery
fn default() -> AtlasSearchQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AtlasSearchQuery
impl RefUnwindSafe for AtlasSearchQuery
impl Send for AtlasSearchQuery
impl Sync for AtlasSearchQuery
impl Unpin for AtlasSearchQuery
impl UnwindSafe for AtlasSearchQuery
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