pub struct MmrBuilder { /* private fields */ }Implementations§
Source§impl MmrBuilder
impl MmrBuilder
Sourcepub fn with_params(diversity: f32, candidates_limit: u32) -> Self
pub fn with_params(diversity: f32, candidates_limit: u32) -> Self
Create a new MmrBuilder with both diversity and candidates limit.
§Arguments
diversity- Must be in the range [0, 1]. Higher values favor diversity.candidates_limit- Maximum number of candidates to consider for re-ranking.
§Examples
use qdrant_client::qdrant::MmrBuilder;
let mmr = MmrBuilder::with_params(0.6, 100).build();Sourcepub fn diversity(self, value: f32) -> Self
pub fn diversity(self, value: f32) -> Self
Tunable parameter for the MMR algorithm. Determines the balance between diversity and relevance.
A higher value favors diversity (dissimilarity to selected results), while a lower value favors relevance (similarity to the query vector).
Must be in the range [0, 1]. Default value is 0.5.
Sourcepub fn candidates_limit(self, value: u32) -> Self
pub fn candidates_limit(self, value: u32) -> Self
The maximum number of candidates to consider for re-ranking.
If not specified, the limit value is used.
pub fn build(self) -> Mmr
Trait Implementations§
Source§impl Clone for MmrBuilder
impl Clone for MmrBuilder
Source§fn clone(&self) -> MmrBuilder
fn clone(&self) -> MmrBuilder
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 Default for MmrBuilder
impl Default for MmrBuilder
Source§impl From<MmrBuilder> for Mmr
impl From<MmrBuilder> for Mmr
Source§fn from(value: MmrBuilder) -> Self
fn from(value: MmrBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MmrBuilder
impl RefUnwindSafe for MmrBuilder
impl Send for MmrBuilder
impl Sync for MmrBuilder
impl Unpin for MmrBuilder
impl UnsafeUnpin for MmrBuilder
impl UnwindSafe for MmrBuilder
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request