Expand description
Text analysis pipeline for full-text search indexing and querying.
Pipeline stages (applied at both index time and query time):
- Unicode NFD normalization + strip combining marks
- Lowercase
- Split on non-alphanumeric boundaries (preserving hyphens within words)
- Filter empty tokens and single characters
- Remove English stop words (binary search on sorted list)
- Snowball English stemming
Produces a Vec<String> of normalized, stemmed tokens suitable for
inverted index insertion and BM25 query matching.
Structs§
- Analyzer
Registry - Registry of named text analyzers and synonym maps per collection.
- Edge
Ngram Analyzer - Edge n-gram analyzer: generates n-grams anchored to the start of each token.
- Keyword
Analyzer - Keyword analyzer: treats entire input as a single token (lowercase).
- Language
Analyzer - Language-specific analyzer: uses Snowball stemming for the configured language.
- Ngram
Analyzer - N-gram analyzer: generates all character n-grams of sizes min..=max for each token.
- Simple
Analyzer - Simple analyzer: lowercase + split on whitespace. No stemming or stop words.
- Standard
Analyzer - Standard English text analyzer (default).
- Synonym
Map - Synonym map: expands query terms with their synonyms at query time.
Traits§
- Text
Analyzer - Text analyzer trait: transforms raw text into searchable tokens.
Functions§
- analyze
- Analyze text into searchable tokens using the standard English analyzer.