SearchService
SearchService wraps one or more search indexes behind a FastAPI HTTP service
with basic authentication, CORS, query caching, and optional HTTPS support.
It can serve both SQLite and pgvector backends simultaneously.
Requires FastAPI and uvicorn in addition to search dependencies:
pip install signalwire[search].
Properties
app
The FastAPI application instance. None if FastAPI is not installed.
indexes
Mapping of index names to file paths (SQLite) or collection names (pgvector).
search_engines
Mapping of index names to loaded
SearchEngine instances.
backend
Storage backend in use. "sqlite" or "pgvector".
port
Port the service listens on.
Methods
Start the HTTP service. Blocks until the server is shut down.
Perform a search programmatically without going through the HTTP API.
Stop the service and perform cleanup.
HTTP Endpoints
When running, the service exposes the following endpoints: