pub struct HybridSearchConfig {
pub weights: HybridWeights,
pub phrase_matching: bool,
pub use_rrif: bool,
pub rrif_k: f32,
pub candidates_multiplier: usize,
}Expand description
混合检索配置
Fields§
§weights: HybridWeights权重配置
phrase_matching: bool是否启用短语匹配
use_rrif: bool是否启用 RRIF 重排序
rrif_k: f32RRIF 参数 K(控制排名衰减)
candidates_multiplier: usize候选结果数量倍数(top_k * candidates_multiplier)
Implementations§
Source§impl HybridSearchConfig
impl HybridSearchConfig
pub fn new() -> Self
pub fn with_weights(self, weights: HybridWeights) -> Self
pub fn with_phrase_matching(self, enabled: bool) -> Self
pub fn with_rrif(self, enabled: bool, k: f32) -> Self
Trait Implementations§
Source§impl Clone for HybridSearchConfig
impl Clone for HybridSearchConfig
Source§fn clone(&self) -> HybridSearchConfig
fn clone(&self) -> HybridSearchConfig
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 HybridSearchConfig
impl Debug for HybridSearchConfig
Auto Trait Implementations§
impl Freeze for HybridSearchConfig
impl RefUnwindSafe for HybridSearchConfig
impl Send for HybridSearchConfig
impl Sync for HybridSearchConfig
impl Unpin for HybridSearchConfig
impl UnsafeUnpin for HybridSearchConfig
impl UnwindSafe for HybridSearchConfig
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> 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