pub struct Bm25TextConfig {
pub params: Bm25Params,
pub tokenizer: Tokenizer,
pub language: Language,
pub lowercase: bool,
pub ascii_folding: bool,
pub stopwords: Option<Stopwords>,
pub stemmer: Option<Stemmer>,
pub min_token_len: Option<usize>,
pub max_token_len: Option<usize>,
}Expand description
Full BM25 text-processing configuration — mirrors Qdrant’s Bm25Config.
Construct via Bm25TextConfig::resolve (flat stringly options, the
single choke point every config surface calls) or struct-literal with
..Default::default(). Numeric parameters validate through
Bm25Params; names parse through Language/Tokenizer/Stemmer.
Fields§
§params: Bm25ParamsValidated k1/b/avg_len.
tokenizer: TokenizerTokenizer (default Tokenizer::Word).
language: LanguageLanguage for default stopwords/stemmer (default English, like Qdrant).
lowercase: boolLowercase before matching (default true, like Qdrant).
ascii_folding: boolLucene ASCII folding before lowercasing (default false, like Qdrant).
stopwords: Option<Stopwords>Stopword override (None = language default).
stemmer: Option<Stemmer>Stemmer override (None = language default).
min_token_len: Option<usize>Drop tokens shorter than this (chars, always enforced, like Qdrant).
max_token_len: Option<usize>Drop tokens longer than this (chars; on the document path, like Qdrant — the prefix query path truncates instead).
Implementations§
Source§impl Bm25TextConfig
impl Bm25TextConfig
Sourcepub fn resolve(
k1: Option<f64>,
b: Option<f64>,
avg_len: Option<f64>,
language: Option<&str>,
tokenizer: Option<&str>,
lowercase: Option<bool>,
ascii_folding: Option<bool>,
stopwords: Option<Vec<String>>,
stemmer: Option<&str>,
min_token_len: Option<usize>,
max_token_len: Option<usize>,
stopwords_languages: Option<Vec<String>>,
) -> Result<Self, QqlError>
pub fn resolve( k1: Option<f64>, b: Option<f64>, avg_len: Option<f64>, language: Option<&str>, tokenizer: Option<&str>, lowercase: Option<bool>, ascii_folding: Option<bool>, stopwords: Option<Vec<String>>, stemmer: Option<&str>, min_token_len: Option<usize>, max_token_len: Option<usize>, stopwords_languages: Option<Vec<String>>, ) -> Result<Self, QqlError>
Resolve flat options into a validated config. None keeps the
corresponding default; invalid names or numbers fail closed with
QQL-VALIDATION-CONFIG.
stopwords:None= language default;Some(list)replaces it with exactlylist(empty disables filtering). Usestopwords_languagesto merge additional language lists instead.stopwords_languages: additional language lists merged withstopwords(QdrantSet.languages). An explicit selection replaces the default, so include the processing language to keep its words. Invalid names fail closed.stemmer:None= language default;Some("none")disables;Some("<language>")overrides.tokenizer:"multilingual"parses here but fails at embed time (seeTokenizer::Multilingual).
Sourcepub fn with_text_options(
&self,
language: Option<&str>,
tokenizer: Option<&str>,
lowercase: Option<bool>,
ascii_folding: Option<bool>,
stopwords: Option<Vec<String>>,
stemmer: Option<&str>,
min_token_len: Option<usize>,
max_token_len: Option<usize>,
stopwords_languages: Option<Vec<String>>,
) -> Result<Self, QqlError>
pub fn with_text_options( &self, language: Option<&str>, tokenizer: Option<&str>, lowercase: Option<bool>, ascii_folding: Option<bool>, stopwords: Option<Vec<String>>, stemmer: Option<&str>, min_token_len: Option<usize>, max_token_len: Option<usize>, stopwords_languages: Option<Vec<String>>, ) -> Result<Self, QqlError>
Update text knobs over the current config: None (or empty names)
keeps self’s value, explicit values replace it. Unlike
Bm25TextConfig::resolve, where None means “Qdrant default”,
this is the incremental-update path (WASM setBm25Text, REPL-style
tuning): previously configured values survive untouched knobs.
Names validate exactly like Bm25TextConfig::resolve. There is no
reset-to-default signal: to restore defaults, resolve a fresh
Bm25TextConfig::default instead of updating.
Sourcepub fn pipeline(&self) -> Bm25Pipeline
pub fn pipeline(&self) -> Bm25Pipeline
Compile into an executable pipeline. Infallible: names already validated at parse/resolve time; remaining choices are total.
Trait Implementations§
Source§impl Clone for Bm25TextConfig
impl Clone for Bm25TextConfig
Source§fn clone(&self) -> Bm25TextConfig
fn clone(&self) -> Bm25TextConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more