Expand description
Cross-repo precedent search: index the git-tracked content of every registered repo, then retrieve it by meaning or by keyword.
The store (index) is a single SQLite database spanning all repos so one
query reaches everything — the answer to “I solved this somewhere, I just
don’t remember which repo.” Retrieval is hybrid: BM25 lexical (FTS5) fused
with semantic cosine over local embeddings (embed, feature semantic),
merged by reciprocal-rank fusion. The binary resolves the data directory and
passes it in; this module performs the dirs-free path joins, mirroring how
config.rs takes a dir: &Path.
Modules§
- chunk
- Turning a repo’s git-tracked files into indexable chunks.
- embed
- Local embedding backend.
- index
- The SQLite-backed search store.
Structs§
- Hit
- One ranked search result. Field order is the JSON serialization order and part of the stable output contract.
- Index
Outcome - Outcome of
build_index. - Index
Status - Health of the search index, consumed by
repograph doctor. - Search
Outcome - Outcome of
search: the ranked hits plus retrieval diagnostics for the binary’s stderr (never part of the stdout data contract).
Constants§
- FIND_
SCHEMA_ VERSION - Schema version of the
repograph findJSON envelope. - INDEX_
DB_ NAME - File name of the central index database under the data directory.
- MODEL_
SUBDIR - Subdirectory of the data directory that caches the embedding model.
Functions§
- build_
index - Build or refresh the index over
repos(each(name, absolute_path)). - index_
db_ path - Path to the index database within
data_dir. - index_
health - Compute the
IndexStatusforrepos. - model_
cache_ dir - Path to the embedding-model cache within
data_dir. - search
- Search the index, returning ranked hits across all repos or one workspace.