pub struct Keyword<S = Root, Sub = WithSubfields> { /* private fields */ }Expand description
An exact, aggregatable string field (keyword, enum, uuid). Sub is a
WithSubfields/NoSubfields type-state marker gating the subfield
accessors.
Implementations§
Source§impl<S, Sub> Keyword<S, Sub>
impl<S, Sub> Keyword<S, Sub>
Sourcepub fn eq(&self, value: impl FlussoValue<Keyword> + Serialize) -> TermQuery<S>
pub fn eq(&self, value: impl FlussoValue<Keyword> + Serialize) -> TermQuery<S>
Exact match. Accepts a String/&str, or any #[derive(FlussoValue)]
keyword enum/newtype — matched against its serde string form
(Account::tier().eq(AccountTier::Pro)).
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>
Match any of the given values (String/&str or keyword FlussoValue types).
Sourcepub fn prefix(&self, value: impl Into<String>) -> PrefixQuery<S>
pub fn prefix(&self, value: impl Into<String>) -> PrefixQuery<S>
Prefix match.
Sourcepub fn wildcard(&self, pattern: impl Into<String>) -> WildcardQuery<S>
pub fn wildcard(&self, pattern: impl Into<String>) -> WildcardQuery<S>
Wildcard match — ? matches one character, * matches any run.
Sourcepub fn regexp(&self, pattern: impl Into<String>) -> RegexpQuery<S>
pub fn regexp(&self, pattern: impl Into<String>) -> RegexpQuery<S>
Regular-expression match (Lucene regex syntax, anchored to the whole term).
Sourcepub fn fuzzy(&self, value: impl Into<String>) -> FuzzyQuery<S>
pub fn fuzzy(&self, value: impl Into<String>) -> FuzzyQuery<S>
Fuzzy term match — tolerates typos within the default AUTO distance.
pub fn asc(&self) -> Sort
pub fn desc(&self) -> Sort
Source§impl<S> Keyword<S, WithSubfields>
impl<S> Keyword<S, WithSubfields>
pub fn at(path: impl Into<String>) -> Self
Sourcepub fn text(&self) -> Text<S, NoSubfields>
pub fn text(&self) -> Text<S, NoSubfields>
The full-text .text subfield flusso auto-creates on a keyword field
(analyzed with flusso_code), so a keyword is still searchable in a
search box. 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 flusso
auto-creates — for case-insensitive exact match and sort. Only in scope
when the field carries auto subfields.