Skip to content

Library index

This is an automatically generated API reference for rebuildable library-level search indexes (.vera-index/).

collection

Rebuildable library-level search index for collections of .vera files.

Classes:

Functions:

VeraCollectionIndex

VeraCollectionIndex(root: Path, generation: Path, conn: Connection)

Opened local collection index used by VeraCorpus when it is fresh.

Methods:

Attributes:

root instance-attribute

root = root

generation instance-attribute

generation = generation

conn instance-attribute

conn = conn

skipped_semantic_model_groups instance-attribute

skipped_semantic_model_groups: list[dict[str, Any]] = []

open classmethod

open(directory: str, *, check_status: bool = True) -> 'VeraCollectionIndex'

close

close() -> None

document_paths

document_paths(*, include_skipped: bool = True) -> list[str]

Return root-relative archive paths recorded by this generation.

inspect_summary

inspect_summary() -> dict[str, Any]

Return corpus metrics from the persistent index without reopening archives.

__enter__

__enter__() -> 'VeraCollectionIndex'

__exit__

__exit__(*exc: object) -> None

search

search(query: str, mode: str = 'hybrid', top_k: int = 10) -> list[IndexHit]

build_library_index

build_library_index(directory: str, *, recursive: bool = False, excludes: Iterable[str] = (), operation: str = 'build') -> dict[str, Any]

Build an index atomically and return a machine-readable report.

update_library_index

update_library_index(directory: str) -> dict[str, Any]

Rebuild an existing library index using its persisted discovery settings.

library_index_status

library_index_status(directory: str, *, verify_hashes: bool = True) -> dict[str, Any]

Report whether a library index exists and matches the current file tree.

See also Collection index design.