pub struct Keyword<S = Root> { /* private fields */ }Expand description
An exact, aggregatable string field (keyword, enum, uuid).
Implementations§
Source§impl<S> Keyword<S>
impl<S> Keyword<S>
pub fn at(path: impl Into<String>) -> Self
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 in_(
&self,
values: impl IntoIterator<Item = impl FlussoValue<Keyword> + Serialize>,
) -> TermsQuery<S>
pub fn in_( &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.
Sourcepub fn text(&self) -> Text<S>
pub fn text(&self) -> Text<S>
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. Available only when the sink’s auto_subfields is on (the
default) and the field defines no custom fields.
Sourcepub fn keyword_lowercase(&self) -> Keyword<S>
pub fn keyword_lowercase(&self) -> Keyword<S>
The case/accent-insensitive .keyword_lowercase subfield flusso
auto-creates — for case-insensitive exact match and sort. Available only
when the sink’s auto_subfields is on (the default).