Toolkit · Collections
Collections Search
Search and a relationship graph over 139,714 archival items.
The problem
Controlled vocabularies are excellent and almost unusable without autocomplete. A visitor typing “henry cabot lodge” gets zero results while “lodge” surfaces “Blodgett.” The vocabulary isn't the problem — the door into it is.
How it works
The widget caches the archive's controlled vocabulary as static JSON on a weekly schedule and adds the autocomplete the original search lacks. Facet lookups then cost the source archive nothing, and its slower full-text endpoint is never in the critical path.
Worth knowing
The relationship graph turned up something genuinely interesting. Roosevelt sits on 51% of all edges — he is connected to everything, so he obscures everything. A second precomputed layout removes his direct links, and the real communities appear: the Army command clustering around Corbin and MacArthur, the White House staff around Loeb and Cortelyou. That's the six degrees, and it only appears once the sun is out of the frame.
The repo also records a reversal: the first version hand-rolled its force layout to stay dependency-free. That was the wrong call — a graph layout is exactly the thing not to hand-roll, and the result looked it.
Using it at your organization
- Point it at your own collections API and taxonomy endpoint.
- The caching pattern transfers even if your API is completely different.
- The graph needs relationship data; without it the search still works standalone.
Stack: Vanilla JavaScript (6.9 KB gzipped) · GitHub Actions · GitHub Pages
Licence: MIT — use, modify and redistribute freely, commercially or not.
Hosting: static files; no server required.
Related tools
Built for the Theodore Roosevelt Presidential Library and released for anyone to use. See all 19 tools, or read how the whole system is built.


