pub struct MatchQuery<S = Root> { /* private fields */ }Expand description
A match-family clause (match, match_phrase, match_phrase_prefix,
match_bool_prefix): the analyzed query value plus whichever options the
kind supports, all written under the field as an object. The kind
selects the wrapper and which setters are meaningful; unset options are
simply omitted.
Implementations§
Source§impl<S> MatchQuery<S>
impl<S> MatchQuery<S>
Sourcepub fn fuzziness(self, fuzziness: impl Into<String>) -> Self
pub fn fuzziness(self, fuzziness: impl Into<String>) -> Self
Edit distance for analyzed terms — "AUTO" or an integer-as-string.
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" (default "OR").
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").
Sourcepub fn prefix_length(self, prefix_length: u32) -> Self
pub fn prefix_length(self, prefix_length: u32) -> Self
Leading characters that must match exactly (fuzzy/prefix matching).
Sourcepub fn max_expansions(self, max_expansions: u32) -> Self
pub fn max_expansions(self, max_expansions: u32) -> Self
Cap on terms a prefix / fuzzy term expands into.
Sourcepub fn analyzer(self, analyzer: impl Into<String>) -> Self
pub fn analyzer(self, analyzer: impl Into<String>) -> Self
Override the search analyzer for this clause.
Sourcepub fn slop(self, slop: u32) -> Self
pub fn slop(self, slop: u32) -> Self
Phrase slop — allowed positional gap (phrase / phrase-prefix).
Sourcepub fn zero_terms_query(self, value: impl Into<String>) -> Self
pub fn zero_terms_query(self, value: impl Into<String>) -> Self
Behavior when analysis yields no terms ("none" or "all").
Trait Implementations§
Source§impl<S> AsQuery<S> for MatchQuery<S>
impl<S> AsQuery<S> for MatchQuery<S>
Source§fn into_query(self) -> Option<Query<S>>
fn into_query(self) -> Option<Query<S>>
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 MatchQuery<S>
impl<S: Clone> Clone for MatchQuery<S>
Source§fn clone(&self) -> MatchQuery<S>
fn clone(&self) -> MatchQuery<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more