pub struct SearchConfig {
pub default_limit: u32,
pub max_limit: u32,
pub min_relevance_score: Option<f64>,
pub preview_max_chars: usize,
pub preview_min_chars: usize,
pub column_weights: BTreeMap<String, f64>,
}Fields§
§default_limit: u32§max_limit: u32§min_relevance_score: Option<f64>BM25 score cutoff. When set, only results with bm25() < threshold are returned.
BM25 returns negative values for rare-term matches and positive values for common-term
matches in large corpora. Example: Some(-0.3) drops near-zero noise in production.
Default None means no threshold filtering (safe for small/test corpora).
preview_max_chars: usizePreview length in chars for the best match (position 0).
preview_min_chars: usizePreview length in chars for weak matches (position 3+).
column_weights: BTreeMap<String, f64>Per-column BM25 weights. Keys are FTS5 column names; unknown keys are ignored. Defaults: key=10, value=1, tags=5, source_type=0.5, scope=0.5.
Trait Implementations§
Source§impl Clone for SearchConfig
impl Clone for SearchConfig
Source§fn clone(&self) -> SearchConfig
fn clone(&self) -> SearchConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchConfig
impl Debug for SearchConfig
Source§impl Default for SearchConfig
impl Default for SearchConfig
Source§impl<'de> Deserialize<'de> for SearchConfigwhere
SearchConfig: Default,
impl<'de> Deserialize<'de> for SearchConfigwhere
SearchConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more