Skip to main content
table.search(query, ...) runs retrieval against a table. Control behavior with strategy and related kwargs.

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.
The provenance record is also appended to <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):
Hybrid with provenance and graph expansion:
Dense search with explicit vector:
DiskANN (build graph with enough rows, typically 32+):

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=1 or set TORADB_CACHE_INDEX_BYTES high enough to hold hot segment sidecars (see Production serving profiles).
  • Enable TORADB_WARMUP_ON_START=1 so the API warms indexes in the background.
  • Run toradb-ingest resume after ingest so TBM3 block-max sidecars, lexicons, and bm25.route.bin exist (required once after upgrading index format).
  • Use explain=True to inspect the provenance trace and identify which tier is slowest.
See Table API for the full signature.