Skip to content

Search

txi search is a group of subcommands for querying the index. Three modes are available:

  • txi search fts — full-text (BM25) search across turns.
  • txi search semantic — vector KNN search across chunk embeddings.
  • txi search hybrid — FTS + semantic merged with Reciprocal Rank Fusion (RRF).
txi search fts "release planning"
txi search semantic "how should we sequence the launch?"
txi search hybrid "release planning"
txi search fts "release planning"
turns (4):
  [142#37] 2026-04-22  Q2 roadmap sync
      Riley Stone: we should land the release planning doc by friday
  ...

Each hit is a header row (turn reference, date, conversation title) followed by the matching turn. In the terminal, matched query terms are highlighted in the snippet.

Options:

  • --speaker NAME — filter turn hits by speaker name.
  • --since ISO_DATE / --until ISO_DATE — bound results by conversation date.
  • --limit N / -n N — max hits. Default 20.
  • --config PATH — override the default config file.

Query syntax: a query using FTS5 operators is passed through to SQLite's FTS5 matcher unchanged, so phrase queries ("exact phrase"), prefix matches (plan*), and boolean operators (release AND planning, release NOT marketing) all work. Such a query is never broadened: if it matches nothing, you get nothing.

A query with no operators is treated as a bag of words. Every term is required first (AND), and only if that matches nothing are the terms retried as OR. This matters for conversational text, where a natural-language question like what did we decide about the deploy window has no single turn containing all of its words. Hits are ranked with bm25, which weights terms by inverse document frequency, so the rare terms in a query dominate common ones even in the OR pass.

txi search semantic "how should we sequence the launch?"
chunks (5):
  [142/4081] 2026-04-22  d=0.2103  turns 36-39  Q2 roadmap sync
      Riley Stone: we should land the release planning doc by friday
      Dana Cole: works for me, i'll take the sequencing section
  ...

The query is embedded with the active embedding provider/model (see Configuration) and matched against chunk_embeddings via sqlite-vec KNN. Distance is the provider's metric (lower is better).

Options:

  • --k N / -n N — number of nearest neighbors. Default 20.
  • --since ISO_DATE / --until ISO_DATE — bound results by conversation date.
  • --conversation ID — restrict to a single conversation.
  • --config PATH — override the default config file.

Run txi sync (or txi embed) at least once before semantic search; vectors are populated as part of the sync pipeline.

txi search hybrid "release planning"
conversations (3):
  [142] 2026-04-22  score=0.0327  fts sem  Q2 roadmap sync
      fts  #37 Riley Stone: we should land the release planning doc by friday
      sem  turns 35-38  d=0.9812
           Riley Stone: we should land the release planning doc by friday
           Dana Cole: works for me, i'll take the sequencing section
  [98] 2026-03-14  score=0.0163  sem  Engineering offsite recap
      sem  turns 12-15  d=1.0104
           Dana Cole: the offsite is really about sequencing the next two quarters

The fts and sem tags on each header row are rendered as colored badges in the terminal, so the two evidence types are easy to tell apart at a glance.

Hits are grouped by conversation_id and scored with Reciprocal Rank Fusion (1 / (60 + rank)) — a conversation that surfaces in both FTS and semantic results outranks one that surfaces in only one.

Each hit shows the evidence behind it: the matching turn from the FTS side, and the matching chunk from the semantic side. Pass --no-evidence for just the ranked conversation rows, which is easier to scan at high -n.

Options mirror the FTS and semantic variants: --speaker, --since, --until, --k/-n, --config.

Use hybrid when you want a single ranked list that reflects both keyword and semantic relevance. Use FTS when you need exact-match precision; use semantic when the query is paraphrastic.