pub struct SearchConfig {Show 20 fields
pub bm25_weight: f64,
pub vector_weight: f64,
pub late_interaction_weight: f64,
pub bm25_k1: f64,
pub bm25_b: f64,
pub namespace_weights: HashMap<String, 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,
pub candidate_dims: Option<usize>,
pub compress_results: 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.
late_interaction_weight: f64Weight for late interaction (ColBERT MaxSim) in RRF fusion. Defaults to 0.0 (disabled). Set to 1.0 to enable as 3rd RRF signal.
bm25_k1: f64BM25 k1 parameter. Controls term frequency saturation. Default: 1.2 (FTS5 standard). Lower (0.8-1.0) helps with technical content.
bm25_b: f64BM25 b parameter. Controls document length normalization. Default: 0.75 (FTS5 standard).
namespace_weights: HashMap<String, f64>Optional per-namespace weight multipliers. Empty = no weighting (all namespaces scored equally).
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.
candidate_dims: Option<usize>Matryoshka candidate-stage embedding dimensions for 2-stage search.
When set to Some(dim) and the matryoshka feature is enabled, the query
embedding is truncated to dim dimensions for candidate retrieval, then
reranked with the full embedding. Defaults to Some(64).
Set to None to disable 2-stage matryoshka search.
compress_results: boolWhen true, compress search result content using SimpleMem-style semantic compression (first sentence + key terms, capped at 150 chars). Defaults to false.
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