pub struct SearchConfig {
pub top_k: usize,
pub similarity_threshold: f32,
pub rrf_k: u32,
pub use_semantic: bool,
pub use_bm25: bool,
}Expand description
Configuration for hybrid search.
Fields§
§top_k: usizeMaximum number of results to return.
similarity_threshold: f32Minimum similarity threshold for semantic results.
rrf_k: u32RRF k parameter (default 60).
use_semantic: boolWhether to include semantic search.
use_bm25: boolWhether to include BM25 search.
Implementations§
Source§impl SearchConfig
impl SearchConfig
Sourcepub const fn with_top_k(self, top_k: usize) -> Self
pub const fn with_top_k(self, top_k: usize) -> Self
Sets the top-k limit.
Sourcepub const fn with_threshold(self, threshold: f32) -> Self
pub const fn with_threshold(self, threshold: f32) -> Self
Sets the similarity threshold.
Sourcepub const fn with_rrf_k(self, k: u32) -> Self
pub const fn with_rrf_k(self, k: u32) -> Self
Sets the RRF k parameter.
Sourcepub const fn with_semantic(self, enabled: bool) -> Self
pub const fn with_semantic(self, enabled: bool) -> Self
Enables or disables semantic search.
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
Auto Trait Implementations§
impl Freeze for SearchConfig
impl RefUnwindSafe for SearchConfig
impl Send for SearchConfig
impl Sync for SearchConfig
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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