table.search(query, ...) runs retrieval against a table. Control behavior with strategy and related kwargs.
Basic search
Strategy reference
Parameters
Retrieval provenance (explain=True)
ToraDB is the only retrieval database that shows its work. When explain=True, every search returns a structured provenance trace alongside results — showing exactly which documents were considered and why each was kept or dropped at every tier.
<table>/_search_log.ndjson on disk for cross-query analysis.
See Retrieval provenance for the full schema and use cases.
Examples
Metadata-style query (field filters in query string):Performance (large segment-only tables)
After bulk ingest, the first search may mmap many segment indexes (cold start). Mitigations:- Use serving profile settings:
TORADB_CACHE_AUTO=1or setTORADB_CACHE_INDEX_BYTEShigh enough to hold hot segment sidecars (see Production serving profiles). - Enable
TORADB_WARMUP_ON_START=1so the API warms indexes in the background. - Run
toradb-ingest resumeafter ingest so TBM3 block-max sidecars, lexicons, andbm25.route.binexist (required once after upgrading index format). - Use
explain=Trueto inspect the provenance trace and identify which tier is slowest.
