pub trait Profile: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn version(&self) -> u32;
// Provided methods
fn fields(&self) -> &[FieldSpec] { ... }
fn filters(&self) -> &[&'static str] { ... }
fn fuzzy_key_map(&self) -> Option<KeyMap> { ... }
fn min_limit(&self) -> usize { ... }
fn min_score(&self) -> f64 { ... }
fn synonyms(&self) -> Option<&Synonyms> { ... }
fn process_query(&self, query: &str) -> String { ... }
fn process_tokens(&self, tokens: Vec<Token>) -> Vec<Token> { ... }
fn make_labels(
&self,
doc: &Document,
housenumber: Option<&str>,
) -> Vec<String> { ... }
fn display_label(
&self,
_doc: &Document,
_housenumber: Option<&str>,
_query: &str,
) -> Option<String> { ... }
}Required Methods§
Provided Methods§
Sourcefn fuzzy_key_map(&self) -> Option<KeyMap>
fn fuzzy_key_map(&self) -> Option<KeyMap>
Keyboard used to limit fuzzy substitutions to neighbouring keys
(addok’s FUZZY_KEY_MAP); None tries every letter.
Sourcefn min_limit(&self) -> usize
fn min_limit(&self) -> usize
Number of results addok computes at least, whatever the requested
limit; the best limit of them are returned. It changes which
collectors run (a bucket is “full” or “dry” relative to it).
Sourcefn process_query(&self, query: &str) -> String
fn process_query(&self, query: &str) -> String
addok’s QUERY_PROCESSORS: string cleanup applied to the ASCII
folded query only, before tokenizing.
Sourcefn process_tokens(&self, tokens: Vec<Token>) -> Vec<Token>
fn process_tokens(&self, tokens: Vec<Token>) -> Vec<Token>
addok’s PROCESSORS after tokenize and normalize, run on index
and query text alike.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".