pub struct Hit {
pub id: String,
pub dataset_id: String,
pub document_id: String,
pub title: String,
pub content: String,
pub score: f32,
pub metadata: Metadata,
}Expand description
One retrieved chunk with its relevance score (higher is better).
Fields§
§id: String§dataset_id: String§document_id: String§title: String§content: String§score: f32§metadata: MetadataImplementations§
Source§impl Hit
impl Hit
Sourcepub fn from_chunk(chunk: &StoredChunk, score: f32) -> Self
pub fn from_chunk(chunk: &StoredChunk, score: f32) -> Self
Build a hit from a stored chunk.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hit
impl<'de> Deserialize<'de> for Hit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Hit
Auto Trait Implementations§
impl Forget for Hit
impl Freeze for Hit
impl Move for Hit
impl RefUnwindSafe for Hit
impl Send for Hit
impl Sync for Hit
impl Unpin for Hit
impl UnsafeUnpin for Hit
impl UnwindSafe for Hit
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