pub struct SearchExplain {
pub prefilter: Option<String>,
pub candidates: Option<i64>,
pub prefilter_skipped: Option<String>,
pub corpus: i64,
}Expand description
Cost breakdown for messages search --receipt-level summary|full (MCP receipt_level,
serialized as search_explanation). For literal/regex search, candidates is the
prefilter output that requires verification. For fuzzy search, it is every row that matched
during complete-corpus scoring, independent of the requested result page.
Fields§
§prefilter: Option<String>Trigram query derived from literal text or regex literals. None means the query has no
=3-char literal anchor, so it must scan the structurally-filtered corpus.
candidates: Option<i64>Rows requiring literal/regex verification after prefiltering, or rows that matched complete
fuzzy scoring. None when no candidate count is available.
prefilter_skipped: Option<String>Why a prefilter was skipped or was not applicable, including complete fuzzy scoring.
corpus: i64Rows matching the structural filters (role/provider/session/date) — the selectivity denominator.
Implementations§
Source§impl SearchExplain
impl SearchExplain
Sourcepub fn summary(&self, has_content_query: bool) -> String
pub fn summary(&self, has_content_query: bool) -> String
One-line (two for content search) human-readable selectivity summary the CLI writes to
stderr for messages search --receipt-level summary|full, so it never pollutes the
parseable stdout. It is a presentation of the four structured fields, which are what
--format json, Python, and MCP carry (the MCP output schema deliberately has no
summary). has_content_query distinguishes a query with no usable >=3-char anchor from
an empty search (structural filters only).
Trait Implementations§
Source§impl Clone for SearchExplain
impl Clone for SearchExplain
Source§impl Debug for SearchExplain
impl Debug for SearchExplain
Auto Trait Implementations§
impl Freeze for SearchExplain
impl RefUnwindSafe for SearchExplain
impl Send for SearchExplain
impl Sync for SearchExplain
impl Unpin for SearchExplain
impl UnsafeUnpin for SearchExplain
impl UnwindSafe for SearchExplain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more