Documentation
¶
Overview ¶
Package search provides an inverted index for fast keyword-based search across AgentOps session and knowledge files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateIndex ¶
UpdateIndex adds or re-indexes a single file in the index. It first removes any existing entries for the path, then re-scans.
Types ¶
type Index ¶
type Index struct {
// Terms maps each lowercase term to a set of document paths.
Terms map[string]map[string]bool `json:"-"`
}
Index is an in-memory inverted index mapping lowercase terms to the set of document paths that contain them.
func BuildIndex ¶
BuildIndex scans all .md and .jsonl files under dir (recursively) and builds an inverted index from their content.
type IndexEntry ¶
IndexEntry is the JSONL-serialised form: one line per term.
type IndexResult ¶
IndexResult is returned by Search.
Click to show internal directories.
Click to hide internal directories.