Basic usage¶
This guide covers the common path: convert a PDF, inspect the archive, then search it from the CLI or Python.
Step 1 — Convert a PDF¶
Directory conversion writes each .vera beside its source PDF:
Step 2 — Inspect and validate¶
Step 3 — Search from the CLI¶
Add --context-chunks 1 for neighboring text, --figures for table/chart
metadata, or --regions for page bounding boxes.
Step 4 — Search from Python¶
from vera import VeraDocument
with VeraDocument.open("manual.vera") as document:
for result in document.search(
"stormwater detention requirements",
mode="hybrid",
top_k=5,
context_chunks=1,
):
print(
result.score,
result.page_start,
result.heading_path,
)
print(result.text[:200])
Use mode="write" with create() / add() / upsert() when you already have
ready-made ChunkRecord objects and do not need PDF conversion.
Step 5 — Search a document library¶
For a folder of .vera files, build an index once and search the corpus: