pub struct SearchConfig {Show 13 fields
pub max_query_variants: usize,
pub max_search_keys_per_candidate: usize,
pub max_total_key_bytes_per_candidate: usize,
pub limit: usize,
pub top_b_for_quality_score: usize,
pub exact: bool,
pub extended: bool,
pub case_sensitive: bool,
pub disabled: bool,
pub no_sort: bool,
pub normalize: bool,
pub matcher_algo: MatcherAlgo,
pub tiebreaks: Vec<Tiebreak>,
}Expand description
Search and ranking configuration used by index and query execution.
Fields§
§max_query_variants: usizeMaximum number of expanded query variants kept for one query.
max_search_keys_per_candidate: usizeMaximum number of search keys kept for one candidate.
max_total_key_bytes_per_candidate: usizeMaximum total UTF-8 bytes for non-base search keys on one candidate.
limit: usizeMaximum number of results returned after ranking.
top_b_for_quality_score: usizeNumber of top candidates to rescore for quality-oriented ordering.
exact: boolUses exact substring scoring instead of fuzzy subsequence scoring.
extended: boolEnables fzf-style extended query syntax.
case_sensitive: boolPreserves case during matching when true.
disabled: boolDisables filtering and returns candidates in ranking order only.
no_sort: boolKeeps input order instead of sorting by score.
normalize: boolAdds normalized candidate and query keys.
matcher_algo: MatcherAlgoFuzzy matcher implementation used for scoring.
tiebreaks: Vec<Tiebreak>Ordered tiebreak rules applied after score comparison.
Implementations§
Source§impl SearchConfig
impl SearchConfig
Sourcepub fn key_budget(&self) -> KeyBudget
pub fn key_budget(&self) -> KeyBudget
Returns the candidate-key generation budget represented by this config.
Sourcepub fn query_budget(&self) -> QueryBudget
pub fn query_budget(&self) -> QueryBudget
Returns the query-variant generation budget represented by this config.
Trait Implementations§
Source§impl Clone for SearchConfig
impl Clone for SearchConfig
Source§fn clone(&self) -> SearchConfig
fn clone(&self) -> SearchConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchConfig
impl Debug for SearchConfig
Auto Trait Implementations§
impl Freeze for SearchConfig
impl RefUnwindSafe for SearchConfig
impl Send for SearchConfig
impl Sync for SearchConfig
impl Unpin for SearchConfig
impl UnsafeUnpin for SearchConfig
impl UnwindSafe for SearchConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more