pub struct HybridConfig {
pub query_text: String,
pub text_columns: Vec<String>,
pub bm25_weight: f32,
pub fusion: HybridFusion,
pub candidate_pool: Option<usize>,
}Expand description
Configuration for hybrid vector+BM25 search.
Fields§
§query_text: StringRaw text query. Tokenized internally for BM25 scoring.
text_columns: Vec<String>Parquet column(s) containing the text to score. Typically ["chunk_text"].
When multiple columns are given, texts are concatenated with a space separator.
bm25_weight: f32BM25 weight in RRF fusion (0.0–1.0). Vector weight = 1.0 - bm25_weight in Linear mode. In Rrf mode, both weights scale their respective RRF rank term.
fusion: HybridFusionFusion strategy. Default: Rrf.
candidate_pool: Option<usize>Minimum number of HNSW candidates to fetch before BM25 re-ranking.
Ensures the BM25 pool is large enough to find lexically relevant results.
Defaults to max(rerank_factor * top_k, 10 * top_k) if not set.
Implementations§
Source§impl HybridConfig
impl HybridConfig
pub fn new(query_text: impl Into<String>) -> Self
pub fn with_text_column(self, col: impl Into<String>) -> Self
pub fn with_text_columns(self, cols: Vec<String>) -> Self
pub fn with_bm25_weight(self, w: f32) -> Self
pub fn with_fusion(self, fusion: HybridFusion) -> Self
pub fn with_candidate_pool(self, n: usize) -> Self
Trait Implementations§
Source§impl Clone for HybridConfig
impl Clone for HybridConfig
Source§fn clone(&self) -> HybridConfig
fn clone(&self) -> HybridConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HybridConfig
impl Debug for HybridConfig
Auto Trait Implementations§
impl Freeze for HybridConfig
impl RefUnwindSafe for HybridConfig
impl Send for HybridConfig
impl Sync for HybridConfig
impl Unpin for HybridConfig
impl UnsafeUnpin for HybridConfig
impl UnwindSafe for HybridConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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