pub struct MergeOptions {
pub strategy: MergeStrategy,
pub weights: HashMap<String, f64>,
pub rrf_k: Option<f64>,
pub remove_duplicates: bool,
}Expand description
Options for merging search results
Fields§
§strategy: MergeStrategyMerge strategy to use
weights: HashMap<String, f64>Weights for each provider (provider name -> weight)
rrf_k: Option<f64>RRF k parameter (default: 60)
remove_duplicates: boolWhether to remove duplicate URLs (default: true)
Implementations§
Source§impl MergeOptions
impl MergeOptions
Sourcepub fn with_strategy(self, strategy: MergeStrategy) -> Self
pub fn with_strategy(self, strategy: MergeStrategy) -> Self
Set the merge strategy
Sourcepub fn with_weights(self, weights: HashMap<String, f64>) -> Self
pub fn with_weights(self, weights: HashMap<String, f64>) -> Self
Set provider weights
Sourcepub fn with_rrf_k(self, k: f64) -> Self
pub fn with_rrf_k(self, k: f64) -> Self
Set the RRF k parameter
Trait Implementations§
Source§impl Clone for MergeOptions
impl Clone for MergeOptions
Source§fn clone(&self) -> MergeOptions
fn clone(&self) -> MergeOptions
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 MergeOptions
impl Debug for MergeOptions
Source§impl Default for MergeOptions
impl Default for MergeOptions
Source§fn default() -> MergeOptions
fn default() -> MergeOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MergeOptions
impl RefUnwindSafe for MergeOptions
impl Send for MergeOptions
impl Sync for MergeOptions
impl Unpin for MergeOptions
impl UnsafeUnpin for MergeOptions
impl UnwindSafe for MergeOptions
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