Skip to main content

SearchHit

Struct SearchHit 

Source
pub struct SearchHit {
    pub id: IdSpace,
    pub write_cursor: u64,
    pub kind: String,
    pub body: String,
    pub score: f64,
    pub branch: SoftFallbackBranch,
    pub source_id: Option<String>,
    pub ce_score: Option<f64>,
}
Expand description

Derives Clone, Debug, PartialEq but not Eqscore: f64 forbids total equality.

Fields§

§id: IdSpace

C-2 (0.8.19 / TC-8) — the typed, non-null, id-space-total hit id (IdSpace). Was the interim write_cursor: u64 in prior releases; now carries the cross-session-stable key: value is the BARE (prefix-stripped) id, and to_prefixed (== {prefix}{value}) reproduces the pre-swap stable_id byte-for-byte (the real-gold-keying no-op). Governed hits are l:, doc-seeded hits h:, synthetic passages p:. This is the caller-facing identity; the positional write_cursor below is engine-internal book-keeping.

§write_cursor: u64

Engine-internal positional cursor (the value id carried before the C-2 swap). Reassigned on every re-projection/re-ingest — NOT cross-session stable, NOT the caller-facing id. Retained because the engine still needs a positional cursor for its own book-keeping (vector rowid mapping, the state='active' filter lookups, RRF recency/importance reweight keys, telemetry result_ids keying, search_expand re-resolution). The SDK bindings do NOT surface it.

§kind: String§body: String§score: f64§branch: SoftFallbackBranch§source_id: Option<String>§ce_score: Option<f64>

0.8.5 (EXP-0) — per-candidate cross-encoder score ce_norm = sigmoid(ce_logit) ∈ [0,1]. Some ONLY for hits inside the reranked pool (the top pool_n when the CE model is loaded); None for the unreranked remainder, the rerank_depth == 0 identity path, an empty list, and the no-CE-model soft-fallback. Additive + nullable: it never participates in ranking, so default-path ordering/scores stay byte-stable.

Trait Implementations§

Source§

impl Clone for SearchHit

Source§

fn clone(&self) -> SearchHit

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SearchHit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SearchHit

Source§

fn eq(&self, other: &SearchHit) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SearchHit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.