pub struct SearchHitMetadata {
pub status: String,
pub confidence: f32,
pub valid_until: Option<String>,
pub heat_base: f32,
pub last_access_at: f32,
pub distance: Option<f32>,
}Expand description
Strongly-typed view over the POC’s dict[str, object] metadata bag.
Fields§
§status: Stringaccepted / pending / rejected.
confidence: f32Stored confidence score in [0.0, 1.0].
valid_until: Option<String>ISO-8601 string of the validity tombstone, or None if the fact is
still current. Stored as a string so the row stays self-describing
across adapters without binding to a specific datetime crate.
heat_base: f32Heat base value [0.0, 1.0]; §7 decay uses this as the seed.
last_access_at: f32Last-access unix timestamp in seconds. The field is typed as f32 for
wire compatibility with downstream JSON consumers that emit fractional
seconds, but the SurrealStore adapter currently truncates to whole
seconds (surreal_store::SearchSimilarRow::to_hit parses an ISO
datetime and stores ts.as_unix_secs() as f32). Treat the value as
second-precision until the storage layer gains sub-second support.
distance: Option<f32>Cosine distance reported by the vector store. Lower = more similar.
None when the underlying store did not surface a distance.
Trait Implementations§
Source§impl Clone for SearchHitMetadata
impl Clone for SearchHitMetadata
Source§fn clone(&self) -> SearchHitMetadata
fn clone(&self) -> SearchHitMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchHitMetadata
impl Debug for SearchHitMetadata
Source§impl<'de> Deserialize<'de> for SearchHitMetadata
impl<'de> Deserialize<'de> for SearchHitMetadata
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>,
Source§impl PartialEq for SearchHitMetadata
impl PartialEq for SearchHitMetadata
Source§fn eq(&self, other: &SearchHitMetadata) -> bool
fn eq(&self, other: &SearchHitMetadata) -> bool
self and other values to be equal, and is used by ==.