retrieval: product passage lane over the A2AJ bulk store

↗ view on GitHub · Eli Ziff · 2026-07-30 · 9990823b

searchLocalA2AJPassages puts passageRetrieval on the product search
path additively - searchLocalA2AJ and every existing export are
unchanged. Two lanes, deterministic first: citation_lookup exact
matches on citation-shaped substrings of the query prepend those
documents' best passages ahead of the bm25 ranking; identity beats
ranking. Results carry document metadata joined from the source db and
verbatim char offsets.

The 5.5 GB-scale sidecar is never built inline (a build would hang a
user request): a missing index is a typed MissingPassageIndexError
naming scripts/build-passage-index.ts, the one place it is built.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AgUm5EcRKbT3duVFMbrQD
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents 3393a876
Stats 4 files changed , +489 , -1
Part of A2AJ / CourtListener Canadian legal-source integration

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-9990823b.md from inside the repo you want the change in.

⬇ Download capture-commit-9990823b.md