pub struct SearchConfig {Show 18 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,
pub fib_quant_require_exact_rerank: bool,
pub fib_quant_block_count: usize,
pub per_dim_bits: u8,
pub per_dim_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.
fib_quant_require_exact_rerank: boolRequire exact f32 reranking when the FibQuant candidate backend is enabled.
fib_quant_block_count: usizeNumber of FibQuant blocks when the FibQuant candidate backend is enabled.
per_dim_bits: u8§per_dim_require_exact_rerank: boolTrait 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
Source§impl Default for SearchConfig
impl Default for SearchConfig
Source§impl<'de> Deserialize<'de> for SearchConfig
impl<'de> Deserialize<'de> for SearchConfig
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>,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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