pub struct Term(/* private fields */);Expand description
A single normalized search term — the output unit of the analysis pipeline and the key under which the full-text index stores postings.
A Term is always the product of Analyzer::analyze: normalized
(lowercased, accent-stripped), tokenized, stop-word-filtered, and
optionally stemmed. The same pipeline runs at index time and query
time, so a query Term is byte-for-byte comparable with the indexed
Term it should match.
Construct one only from already-analyzed text. from_normalized
exists for the pipeline itself and for callers that have run the
identical analysis; it does not normalize on your behalf.
Implementations§
Source§impl Term
impl Term
Sourcepub fn from_normalized(token: impl Into<String>) -> Self
pub fn from_normalized(token: impl Into<String>) -> Self
Wrap an already-normalized token.
The pipeline guarantees the input has been normalized; this constructor performs no normalization itself.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume the term, yielding its inner string.