Skip to main content

TokenFilter

Trait TokenFilter 

Source
pub trait TokenFilter: Send + Sync {
    // Required method
    fn apply(&self, tokens: &mut Vec<Token>);
}
Expand description

Transforms tokens in the analysis pipeline.

Implementations must be thread-safe (Send + Sync) so that analyzers can be shared across indexing threads.

Required Methods§

Source

fn apply(&self, tokens: &mut Vec<Token>)

Apply the filter to tokens, modifying in place.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§