pub struct ExplainedResult {
pub id: PointIdSer,
pub score: f32,
pub payload: Option<Value>,
pub explain: HashMap<String, f32>,
}Expand description
An explained similarity result with per-field score breakdown
Fields§
§id: PointIdSerPoint ID
score: f32Overall weighted similarity score
payload: Option<Value>Point payload
explain: HashMap<String, f32>Per-field score contributions (already weighted)
Implementations§
Source§impl ExplainedResult
impl ExplainedResult
Sourcepub fn from_ranked(ranked: RankedResult, include_payload: bool) -> Self
pub fn from_ranked(ranked: RankedResult, include_payload: bool) -> Self
Create an explained result from a ranked result
Sourcepub fn from_ranked_list(
ranked_list: Vec<RankedResult>,
include_payload: bool,
) -> Vec<Self>
pub fn from_ranked_list( ranked_list: Vec<RankedResult>, include_payload: bool, ) -> Vec<Self>
Create a list of explained results from ranked results
Trait Implementations§
Source§impl Clone for ExplainedResult
impl Clone for ExplainedResult
Source§fn clone(&self) -> ExplainedResult
fn clone(&self) -> ExplainedResult
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 ExplainedResult
impl Debug for ExplainedResult
Auto Trait Implementations§
impl Freeze for ExplainedResult
impl RefUnwindSafe for ExplainedResult
impl Send for ExplainedResult
impl Sync for ExplainedResult
impl Unpin for ExplainedResult
impl UnwindSafe for ExplainedResult
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