Search¶
transcript_indexer.search
¶
Query helpers over the indexed corpus.
Pure functions over a sqlite3.Connection. Used by the CLI today and the MCP server later. Covers FTS5 metadata search, semantic KNN search over chunk embeddings, and a hybrid RRF merge of the two.
search_conversations(conn, *, since=None, until=None, participant=None, kind=None, title_query=None, limit=None)
¶
List conversations matching the given metadata filters.
Source code in src/transcript_indexer/search.py
get_conversation(conn, conversation_id)
¶
Fetch a single conversation with its turns.
Source code in src/transcript_indexer/search.py
search_turns_fts(conn, query, *, speaker=None, since=None, until=None, limit=20)
¶
Run an FTS5 query against turns and return ranked hits.
Source code in src/transcript_indexer/search.py
search_semantic(conn, cfg, query, *, k=20, since=None, until=None, conversation_id=None)
¶
KNN search against chunk embeddings, joined back to conversations.
Source code in src/transcript_indexer/search.py
search_hybrid(conn, cfg, query, *, k=20, speaker=None, since=None, until=None)
¶
Hybrid FTS+semantic search merged with Reciprocal Rank Fusion.
Hits are keyed by conversation_id so an FTS turn match and a semantic
chunk match against the same conversation reinforce each other.