{% extends "base.html" %} {% block content %}

Introduction

Archivum is a personal document and reference management system designed for high-performance indexing and retrieval of academic papers, books, and technical documents.

Unlike traditional managers, Archivum prioritizes identity over location. Documents are tracked by their cryptographic content hash, ensuring that your library remains intact even if files are moved, renamed, or synced across different devices.

Architecture

The library is built on a three-tier database structure stored as high-performance .feather files:

Ref

Bibliographic Metadata
Tags, authors, titles, journals, and years. Synchronized with an external BibTeX file.

Doc

Physical Files
Path, size, creation date, and content hash. Managed in a sharded directory structure.

Ref-Doc

Junction Table
The bridge that links high-level tags to physical content hashes.

Read

Read History
Tracks timestamps, view counts, and origin URLs (referrers) for every document opened.

Semantic Cache

Embedding Cache
Stores high-dimensional vectors for papers, enabling instant re-analysis and galaxy mapping without re-encoding.

Full-Text Extraction

When documents are imported, Archivum automatically extracts their text content. This text is sharded into a separate directory, enabling blazing-fast full-text searches across thousands of documents using the integrated Ripgrep engine.

Query Syntax

The primary search bar on the Query page is powered by querexfuzz. A small live status line below the input shows the exact expression that will be run.

1. Live Query Interpretation

For quick lookups, plain text becomes a fuzzy # search. Explicit querexfuzz syntax is limited to the 50 most recent published matches by default.

Syntax Description
keyword Runs as # keyword for fast fuzzy matching.
!AuthorName Runs as recent top 50 !AuthorName.
field ~ pattern Runs as recent top 50 field ~ pattern.
year > 2020 Runs as recent top 50 year > 2020.
q top 20 recent Runs exactly as top 20 recent.

Querex symbols are #, ~, =, <, >, and !. Use q when you do not want automatic recent top 50 wrapping.

2. Full Querexfuzz (Prefix: q)

Prefix your query with q to pass an expression through unchanged.

q select year, author, title author ~ /Wang, R/ and year > 2019 order by -year
  • Fuzzy Search: Use # for fast skimmatch fuzzy matching. q # machine learning
  • Projection: Control which columns are returned using select col1, col2.
  • Sorting: Use order by field or order by -field for descending.
  • Limits: Add top 50 to restrict result size.

For the complete grammar, visit the Querexfuzz Project.

BibTeX Format

Archivum stores bibliographic metadata in a deliberately narrow BibTeX-compatible shape. Keeping entry types and fields normalized makes imports safer, keeps Feather tables predictable, and reduces BibTeX synchronization noise.

Entry Types

Use one of these types for new or edited records:

article, book, techreport, misc, incollection, unpublished, inproceedings, phdthesis
Supported Fields

Restrict BibTeX fields to the following set unless a specific import requires a temporary exception:

tag, type, title, year, author, journal, volume, number, month, pages, booktitle, editor, edition, doi, isbn, publisher, institution, address, url, archivePrefix, arxivId, eprint
Conventions
  • Tag: The BibTeX key is the Archivum tag. Keep it stable after import because links, citations, reports, and document mappings use it as the reference identity.
  • Type: Store the entry type without the leading @ in editable metadata, for example article rather than @article.
  • Authors and editors: Use BibTeX and between names. Prefer canonical names that match the library's author normalization.
  • Dates: Keep year as a four-digit year when known. Use month only when it is bibliographically meaningful.
  • Identifiers: Prefer DOI, ISBN, URL, and arXiv fields over embedding identifiers in titles or notes.
  • Document paths: Do not add Mendeley-style file fields manually; Archivum maintains document links through the ref-doc table and importer workflow.
@article{Wang2024,
  author = {Wang, Ruodu and Smith, Jane},
  title = {Spectral Risk Measures},
  year = {2024},
  journal = {Insurance Mathematics and Economics},
  doi = {10.0000/example}
}

Screen Guide

Query Page

The default landing page for searching your library.

  • Search Bar: Supports history (Up/Down arrows). Results appear instantly as you type, and the live status line shows the interpreted querexfuzz expression.
  • Quick Actions:
    • Recent: Dropdown to quickly view the last 50, 100, or 250 items added.
    • Read: Quick access to your reading history, ordered by most recent.
    • Random: Discovers papers using a random 2-digit hex hash prefix.
  • View Modes: Toggle between List, Verbose (all metadata), and Table.
  • Exports: Download the current result set as CSV, BibTeX, or BibTeX+ from the Export menu. BibTeX+ adds Archivum document hashes and Mendeley-style file fields when a matched document path is available.
Network & Discovery

Advanced visualization modes for exploring connections and thematic clusters.

1. Social Graph (Co-Authorship)

Maps the "Social Network" of your library. Nodes represent authors, and edges represent papers they have co-authored.

  • Weighting: Author nodes are sized by the total number of papers they have in the current search universe.
  • Connectivity: Edges connect authors who appear on the same paper. Edge thickness indicates the number of collaborations.
  • Interaction: Click an author to see their papers. Double-click to "Rebase" the graph onto that author.
  • Ripgrep Universe: Searches using rg are case insensitive by default, matching the Ripgrep page behavior. Use Options → Case sensitive rg when exact case matters.
  • Live Interpretation: The status box shows whether the current text is a raw query universe, a q querex universe, an rg full-text universe, or a combined q ... rg ... universe.
2. Semantic Galaxy (Thematic Clustering)

Uses Machine Learning to project your papers into a 2D "Galaxy" where distance represents semantic similarity.

  • Embedding: Papers are converted into high-dimensional vectors (384-D) using the all-MiniLM-L6-v2 transformer model.
  • Cache: Embeddings are cached per library and source, so repeated runs usually reuse existing vectors. First runs, new documents, or longer full-text windows may need to encode missing papers.
  • Projection (UMAP): These vectors are flattened into 2D coordinates using UMAP, preserving local and global structures while using available CPU cores.
  • Clustering (HDBSCAN): HDBSCAN automatically identifies dense "Constellations" of related papers.
  • Lone Stars: Points colored grey represent "Noise"-papers that don't statistically fit into any specific cluster.
  • Sources: Analysis can be run against Title & Metadata, the first 2,000 characters of Full Text, or the first 4,000 characters of Full Text.
  • Verbose Logs: Verbose mode reports timing spans for universe resolution, embedding cache lookup, model load, missing embedding generation, UMAP, clustering, serialization, and browser rendering. When an rg clause is used, it also shows the ripgrep command and cache hit/miss.
Ripgrep (Full-Text)

Search inside the actual text of your PDF collection.

  • Streaming Results: Matches are streamed to the browser in real-time.
  • Regex Feedback: The small status line below the input checks whether the typed pattern is valid JavaScript regex syntax before running ripgrep.
  • Context Control: Specify how many lines of context to show before and after matches.
  • Summary Mode: Groups matches by year and author to provide statistical insights into your library's content.
  • Exports: Send the top hash-limited matches to Query, or download all matches as CSV, BibTeX, or BibTeX+ from the Export menu.
Report Studio

A specialized workflow for synthesizing research findings into persistent journals.

  • Integrated View: Research reports are rendered as HTML fragments using Pandoc and embedded directly within the Archivum interface.
  • Archival PDFs: (Admin only) Generate professional-grade PDFs using Quarto + Tectonic with scrartcl styling (A4, 10pt font).
  • Markdown Support: Add introductions and research notes to your reports using standard Markdown syntax.
  • Smart Caching: Rendered HTML, PDF artifacts, and report images are cached in the library's exports/ directory. If a report is viewed or downloaded again, Archivum serves the cached version instantly unless the source .qmd file has been modified.
  • Raw Source: Access the raw .qmd file for manual editing or custom publication workflows.
{% if is_admin %}
Ingest (Admin Mode)

Import new documents or BibTeX entries into the library.

  • Source: Paste BibTeX, provide a local path, or enter a URL (including Arxiv/DOI support).
  • Workbench: Edit the source BibTeX while viewing the staged document and metadata candidates.
  • Import Preview: The preview runs the real BibTeX importer without saving. It shows the BibTeX that will be produced after author Trie normalization and tag allocation.
  • Tag Allocation: Previewed tags are advisory. The final tag is recomputed when you click GO: Archive Document and is locked down only when the library update is saved.
  • Duplicate Detection: Archivum warns on matching hashes and blocks unsafe duplicate or merge-warning imports before committing.
  • Commit: Archive Document reruns the same import path, shards the document into the library store, writes import audit files, updates the Feather data, and extracts text for new PDFs.
Editor (Admin Mode)

A high-density interface for bulk metadata management.

  • Tag Sidebar: Live-filterable list of every tag in your library.
  • Direct Edit: Edit the underlying BibTeX source directly and save with Ctrl+S or the Save button.
{% endif %}

Regular Expressions

Most search fields in Archivum support standard regular expressions. Here are common patterns:

Symbol Meaning Example
. Any single character n.t.re matches Nature
^ Start of string ^Smith matches Smith but not Goldsmith
$ End of string 2023$ matches only tags ending in 2023
* Zero or more of previous ba*n matches bn, ban, baan
+ One or more of previous ba+n matches ban, baan, etc.
? Zero or one of previous (optional) cats? matches cat or cats
| Logical OR Nature|Science matches either journal
\d Any digit \d{4} matches a 4-digit year
\w Any word character (alnum + underscore) \w+ matches a whole word
\s Any whitespace (space, tab) Wang\s+R matches "Wang, R" if space exists
[ ] Character class / set [aeiou] matches any vowel
( ) Capturing group (Auto|Machine) groups for priority or repetition
{% endblock %}