pub struct SearchRow {Show 17 fields
pub s_id: i64,
pub obj_tp: char,
pub obj_id: Box<str>,
pub part_id: Box<str>,
pub part_kind: Option<Box<str>>,
pub parent_part: Option<Box<str>>,
pub anchor_id: Option<Box<str>>,
pub title: Option<Box<str>>,
pub tags: Option<Box<str>>,
pub content_type: Option<Box<str>>,
pub owner_tag: Option<Box<str>>,
pub visibility: Option<char>,
pub root_id: Option<Box<str>>,
pub updated_at: Timestamp,
pub snippet: Option<Box<str>>,
pub snippet_matches: Option<Box<[SearchMatch]>>,
pub score: f64,
}Expand description
A single search index row plus its FTS ranking data.
Fields§
§s_id: i64§obj_tp: char§obj_id: Box<str>§part_id: Box<str>§part_kind: Option<Box<str>>§parent_part: Option<Box<str>>§anchor_id: Option<Box<str>>§title: Option<Box<str>>§content_type: Option<Box<str>>§owner_tag: Option<Box<str>>§visibility: Option<char>§root_id: Option<Box<str>>§updated_at: Timestamp§snippet: Option<Box<str>>Server-built excerpt as plain text — no markup of any kind.
The text is document content, so any in-band delimiter is ambiguous with a
document containing that delimiter literally — an <mark> scheme deletes
the literal string from the excerpt and lets it widen the highlight over
unmatched text. snippet_matches carries the highlight out of band
instead, which no document content can forge.
An adapter implementing this trait must honour that: the value is handed to the client unmodified.
snippet_matches: Option<Box<[SearchMatch]>>Ranges within snippet to emphasise, ascending and non-overlapping.
None when there is no snippet or nothing matched inside it.
score: f64Raw bm25() value: negative, more negative = more relevant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SearchRow
impl RefUnwindSafe for SearchRow
impl Send for SearchRow
impl Sync for SearchRow
impl Unpin for SearchRow
impl UnsafeUnpin for SearchRow
impl UnwindSafe for SearchRow
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