pub struct Text<S = Root, Sub = WithSubfields> { /* private fields */ }Expand description
An analyzed full-text field (text, identifier). No exact eq. Sub is
a WithSubfields/NoSubfields type-state marker gating the subfield
accessors (and the any_of / asc sugar built on them).
Implementations§
Source§impl<S, Sub> Text<S, Sub>
impl<S, Sub> Text<S, Sub>
Sourcepub fn boosted(self, weight: f32) -> Self
pub fn boosted(self, weight: f32) -> Self
Weight this field for multi_match (field^weight). Has no effect on
this handle’s own matches / match_phrase clauses, which carry their
own boost.
Sourcepub fn matches(&self, value: impl Into<String>) -> MatchQuery<S>
pub fn matches(&self, value: impl Into<String>) -> MatchQuery<S>
Analyzed match.
Sourcepub fn match_phrase(&self, value: impl Into<String>) -> MatchQuery<S>
pub fn match_phrase(&self, value: impl Into<String>) -> MatchQuery<S>
Analyzed phrase match (terms in order).
Sourcepub fn match_phrase_prefix(&self, value: impl Into<String>) -> MatchQuery<S>
pub fn match_phrase_prefix(&self, value: impl Into<String>) -> MatchQuery<S>
Analyzed phrase-prefix match (search-as-you-type).
Sourcepub fn match_bool_prefix(&self, value: impl Into<String>) -> MatchQuery<S>
pub fn match_bool_prefix(&self, value: impl Into<String>) -> MatchQuery<S>
Bool-prefix match — every term a term except the last, which is a
prefix (the other half of search-as-you-type).
Sourcepub fn matches_fuzzy(&self, value: impl Into<String>) -> MatchQuery<S>
pub fn matches_fuzzy(&self, value: impl Into<String>) -> MatchQuery<S>
Analyzed match tolerant of typos — sugar for
matches(v).fuzziness(Fuzziness::Auto).
Source§impl<S> Text<S, WithSubfields>
impl<S> Text<S, WithSubfields>
pub fn at(path: impl Into<String>) -> Self
Sourcepub fn any_of(
&self,
values: impl IntoIterator<Item = impl FlussoValue<Keyword> + Serialize>,
) -> TermsQuery<S>
pub fn any_of( &self, values: impl IntoIterator<Item = impl FlussoValue<Keyword> + Serialize>, ) -> TermsQuery<S>
Exact match against any of the given values, on the auto .keyword
subfield. A terms query on the analyzed field would match raw tokens,
which is rarely intended; this targets the exact subfield instead. Only
in scope when the field carries auto subfields.
Sourcepub fn keyword(&self) -> Keyword<S, NoSubfields>
pub fn keyword(&self) -> Keyword<S, NoSubfields>
The exact .keyword subfield flusso auto-creates on a text field —
for exact eq / any_of, wildcard, prefix, and exact sort. (A
wildcard belongs here, not on the analyzed handle, which matches tokens
not the whole value.) Only in scope when the field carries auto subfields.
Sourcepub fn keyword_lowercase(&self) -> Keyword<S, NoSubfields>
pub fn keyword_lowercase(&self) -> Keyword<S, NoSubfields>
The case/accent-insensitive .keyword_lowercase subfield — for
case-insensitive exact match and sort. Only in scope when the field
carries auto subfields.