pub struct ScoredDocument {
pub id: String,
pub document: Document,
pub score: f64,
}Expand description
A document paired with a similarity score from a vector query.
id is the backend’s stable identifier for this document — the same id
passed to VectorStore::upsert
when the document was stored. Callers that need to act on a search
result (e.g. delete it) must be able to round-trip through this id;
implementations of VectorStore::query must therefore always populate it
with the real, stable id rather than a synthetic/rank-derived value.
Fields§
§id: String§document: Document§score: f64Implementations§
Trait Implementations§
Source§impl Clone for ScoredDocument
impl Clone for ScoredDocument
Source§fn clone(&self) -> ScoredDocument
fn clone(&self) -> ScoredDocument
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 moreAuto Trait Implementations§
impl Freeze for ScoredDocument
impl RefUnwindSafe for ScoredDocument
impl Send for ScoredDocument
impl Sync for ScoredDocument
impl Unpin for ScoredDocument
impl UnsafeUnpin for ScoredDocument
impl UnwindSafe for ScoredDocument
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