Documentation
¶
Overview ¶
Package search performs server-side transcript search: targeted retrieval instead of paging a 50KB blob into the agent's context.
Index ¶
Constants ¶
View Source
const ( DefaultContextCues = 1 DefaultMaxMatches = 10 MaxMatchesLimit = 50 )
Variables ¶
This section is empty.
Functions ¶
func NormalizeText ¶
NormalizeText lowercases and normalizes typography for matching and for advisory content checks.
Types ¶
type Match ¶
type Match struct {
CueIndex int `json:"cue_index"`
StartSeconds float64 `json:"start_seconds"`
Timestamp string `json:"timestamp"`
Text string `json:"text"`
Before string `json:"before,omitempty"`
After string `json:"after,omitempty"`
}
Match is one matching cue with optional surrounding context.
type Mode ¶
type Mode string
Mode decides how a multi-word query is satisfied.
All (default) preserves the original behaviour: every term must appear within the cue window. Any exists because a literal AND returns a false negative when the speaker paraphrases. Phrase requires adjacency.
type Result ¶
type Result struct {
Matches []Match `json:"matches"`
TotalMatches int `json:"total_matches"`
Truncated bool `json:"truncated"`
// NextCue is set when Truncated: pass it back as StartCue to continue.
NextCue *int `json:"next_cue,omitempty"`
MatchMode string `json:"match_mode,omitempty"`
Terms []TermStat `json:"terms,omitempty"`
Notes []string `json:"notes,omitempty"`
}
Result is the complete search response.
Click to show internal directories.
Click to hide internal directories.