AgentsSearch

IndexBuilder

View as MarkdownOpen in Claude

IndexBuilder processes document directories into searchable indexes. It handles file discovery, text extraction, chunking, embedding generation, and storage into either SQLite (.swsearch files) or pgvector backends. This is the programmatic equivalent of the sw-search CLI tool.

1from signalwire.search import IndexBuilder

Requires search dependencies. Install with pip install signalwire[search-full] for full document processing support.

Properties

model_name
str

Name of the sentence transformer model used for embeddings.

chunking_strategy
str

Active chunking strategy passed to the internal DocumentProcessor.

backend
str

Storage backend. Either "sqlite" or "pgvector".

doc_processor
DocumentProcessor

The DocumentProcessor instance used for chunking.

model
SentenceTransformer | None

The loaded sentence transformer model. None until the first call to build_index() or build_index_from_sources().

Methods