Skip to main content

transcript_hits

Function transcript_hits 

Source
pub fn transcript_hits(
    id: &str,
    query: &str,
    context_messages: usize,
    per_message_chars: usize,
) -> Result<Option<WikiHitTranscript>>
Expand description

The passages of one indexed session that match query, or None when the id names no indexed session.

Every matching message is returned with context_messages neighbours on each side; overlapping groups are merged and each group’s first block says how many messages were skipped before it. Each block’s text is capped at per_message_chars characters, keeping the window around its first match.