pub struct SearchHit {
pub id: String,
pub score: f32,
pub source_json: String,
}Expand description
A single search hit returned by the backend.
score is a backend-defined relevance number. It is not normalised
across backends — callers that rank across multiple providers should
do their own re-ranking. source_json is the indexed document
re-serialised as a JSON string, matching the Document::fields_json
convention on the write side.
Fields§
§id: StringThe document’s stable id — same value the caller passed to
index.
score: f32Relevance score from the backend. Comparable within a single result set, not across backends or across queries.
source_json: StringStored document payload as a JSON string. Empty string if the backend chose not to return the source (some providers make this configurable).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SearchHit
impl<'de> Deserialize<'de> for SearchHit
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
Auto Trait Implementations§
impl Freeze for SearchHit
impl RefUnwindSafe for SearchHit
impl Send for SearchHit
impl Sync for SearchHit
impl Unpin for SearchHit
impl UnsafeUnpin for SearchHit
impl UnwindSafe for SearchHit
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