Skip to main content
toradb — local retrieval database CLI

Commands:
  smoke              Quick ingest + search sanity check
  query PATH TABLE Q Run BM25 search and print ranked ids
  sql PATH QUERY     Run a SQL statement (search or analytics)
  tables PATH        List tables (DESCRIBE summary per table)
  reindex PATH TABLE Rebuild indexes (CREATE INDEX; USING BM25, HNSW, DISKANN, …)

toradb-ingest — native bulk ingest (Rust, no Python hot path)

  bulk               Stream parquet/jsonl → segments + finish indexes
  finish             Build indexes after bulk load
  resume             Idempotent index build / crash recovery

toradb-ingest bulk

Build: cargo build -p toradb-cli --release
--db
path
required
Database directory.
--table
str
default:"passages"
Table name.
--source
str
default:"parquet"
parquet or jsonl.
--path
path
Parquet file/directory or JSONL path.
--limit
int
default:"0"
Max documents (0 = no limit).
--drop-table
flag
Remove existing table directory before ingest.
Bulk tables use index_mode=segment_only: segment BM25 sidecars without merging into RAM-heavy bm25.bin or reloading all texts at finish.

toradb smoke

Creates a temporary database, ingests sample docs, runs search and GROUP BY SQL.
Exit code
int
0 on success, 1 on failure.

toradb query PATH TABLE Q

PATH
str
required
Database directory.
TABLE
str
required
Table name.
Q
str
required
Query string.
--top-k
int
default:"10"
Number of results.
Prints id and score tab-separated.

toradb sql PATH QUERY

Runs any supported SQL statement. Prints text for DDL/DESCRIBE; tab-separated columns for analytics/search frames.

toradb tables PATH

Runs DESCRIBE for each table in the database.

toradb reindex PATH TABLE

--using
str
default:"BM25"
Index algorithm.
--column
str
default:"text"
Indexed column.
Executes CREATE INDEX cli_reindex ON table (column) USING ....

Exit codes

CodeMeaning
0Success
1Command failed (e.g. smoke check)
2Usage error (missing arguments)
See CLI guide.