pub struct SimilarityStats {
pub candidates_count: usize,
pub results_count: usize,
pub avg_score: f32,
pub best_score: f32,
pub top_contributing_field: Option<String>,
}Expand description
Summary statistics for a similarity query
Fields§
§candidates_count: usizeNumber of candidates considered
results_count: usizeNumber of results returned
avg_score: f32Average score of results
best_score: f32Score of best result
top_contributing_field: Option<String>Field that contributed most to best result
Implementations§
Source§impl SimilarityStats
impl SimilarityStats
Sourcepub fn compute(results: &[RankedResult], candidates_count: usize) -> Self
pub fn compute(results: &[RankedResult], candidates_count: usize) -> Self
Compute stats from ranked results
Trait Implementations§
Source§impl Clone for SimilarityStats
impl Clone for SimilarityStats
Source§fn clone(&self) -> SimilarityStats
fn clone(&self) -> SimilarityStats
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimilarityStats
impl Debug for SimilarityStats
Auto Trait Implementations§
impl Freeze for SimilarityStats
impl RefUnwindSafe for SimilarityStats
impl Send for SimilarityStats
impl Sync for SimilarityStats
impl Unpin for SimilarityStats
impl UnwindSafe for SimilarityStats
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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