pub struct MultiMatchQuery<S = Root> { /* private fields */ }Expand description
A multi_match clause: one analyzed query over several fields, with the
type / operator / fuzziness / tie_breaker / minimum_should_match
options plus boost / name.
Implementations§
Source§impl<S> MultiMatchQuery<S>
impl<S> MultiMatchQuery<S>
Sourcepub fn match_type(self, match_type: impl Into<String>) -> Self
pub fn match_type(self, match_type: impl Into<String>) -> Self
The scoring type: "best_fields" / "most_fields" / "cross_fields"
/ "phrase" / "phrase_prefix" / "bool_prefix".
Sourcepub fn operator(self, operator: impl Into<String>) -> Self
pub fn operator(self, operator: impl Into<String>) -> Self
Combine analyzed terms with "AND" or "OR".
Sourcepub fn fuzziness(self, fuzziness: impl Into<String>) -> Self
pub fn fuzziness(self, fuzziness: impl Into<String>) -> Self
Edit distance — "AUTO" or an integer-as-string.
Sourcepub fn tie_breaker(self, tie_breaker: f32) -> Self
pub fn tie_breaker(self, tie_breaker: f32) -> Self
tie_breaker for best_fields — how much non-winning fields contribute.
Sourcepub fn minimum_should_match(self, value: impl Into<String>) -> Self
pub fn minimum_should_match(self, value: impl Into<String>) -> Self
How many of the analyzed terms must match (e.g. "75%", "2").
Trait Implementations§
Source§impl<S> AsQuery<S> for MultiMatchQuery<S>
impl<S> AsQuery<S> for MultiMatchQuery<S>
Source§fn into_query(self) -> Option<Query<S>>
fn into_query(self) -> Option<Query<S>>
The clause this produces, or
None to contribute nothing.Source§fn and(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
fn and(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
self AND other. An absent side is the identity.Source§fn or(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
fn or(self, other: impl AsQuery<S>) -> Query<S>where
Self: Sized,
self OR other. An absent side is the identity.Source§impl<S: Clone> Clone for MultiMatchQuery<S>
impl<S: Clone> Clone for MultiMatchQuery<S>
Source§fn clone(&self) -> MultiMatchQuery<S>
fn clone(&self) -> MultiMatchQuery<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<S> Freeze for MultiMatchQuery<S>
impl<S> RefUnwindSafe for MultiMatchQuery<S>
impl<S> Send for MultiMatchQuery<S>
impl<S> Sync for MultiMatchQuery<S>
impl<S> Unpin for MultiMatchQuery<S>
impl<S> UnsafeUnpin for MultiMatchQuery<S>
impl<S> UnwindSafe for MultiMatchQuery<S>
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