pub struct SearchConfig {Show 14 fields
pub bm25_weight: f64,
pub vector_weight: f64,
pub rrf_k: f64,
pub candidate_pool_size: usize,
pub default_top_k: usize,
pub min_similarity: f64,
pub recency_half_life_days: Option<f64>,
pub recency_weight: f64,
pub rerank_from_f32: bool,
pub derived_vector_backend: DerivedVectorBackendPolicy,
pub turbo_quant_bits: u8,
pub turbo_quant_projections: usize,
pub turbo_quant_seed: u64,
pub turbo_quant_require_exact_rerank: bool,
}Expand description
Search tuning parameters.
Fields§
§bm25_weight: f64Weight for BM25 score in RRF fusion.
vector_weight: f64Weight for vector similarity in RRF fusion.
rrf_k: f64RRF constant (k). Controls rank importance decay.
candidate_pool_size: usizeNumber of candidates from each search method before fusion.
default_top_k: usizeDefault number of results to return.
min_similarity: f64Minimum cosine similarity threshold for vector candidates.
recency_half_life_days: Option<f64>Optional recency boost. If enabled, results are boosted based on how
recently they were created/updated. The value is the half-life in days —
a fact that is recency_half_life_days old gets 50% of the recency boost.
None = no recency weighting (current behavior, default).
recency_weight: f64Weight of the recency boost relative to BM25 and vector scores in RRF. Only used when recency_half_life_days is Some. Default: 0.5
rerank_from_f32: boolWhen true, rerank top HNSW candidates using exact f32 cosine similarity from SQLite. Improves recall at the cost of one batched SQL query. Only applies when HNSW feature is enabled. Default: true
derived_vector_backend: DerivedVectorBackendPolicyOptional derived-vector candidate backend. Disabled by default because raw f32 embeddings remain authoritative.
turbo_quant_bits: u8TurboQuant polar angle bits when the TurboQuant candidate backend is enabled.
turbo_quant_projections: usizeTurboQuant QJL projection count when the TurboQuant candidate backend is enabled.
turbo_quant_seed: u64TurboQuant profile seed when the TurboQuant candidate backend is enabled.
turbo_quant_require_exact_rerank: boolRequire exact f32 rerank for TurboQuant candidates. Defaults to true.
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 more