Create full-text indexes and run keyword search from SQL
Keyword search is often handled outside SQL, which introduces additional systems and indexing steps. With built-in full-text indexing, you can run ranked keyword queries directly within the workspace, using the same engine as relational queries. This keeps search and structured queries in one place.
How it works
Step 1 — Pick a table and text column
For our support knowledge base, open the help articles table and list its columns—I need to know which one holds the article text.Step 2 — Create a full-text index
Turn on keyword search for the body field of those help articles so we can match phrases quickly.With --async, BM25 index creation runs as a background job—poll until it completes before you rely on that index for search.
Step 3 — Keyword search from the CLI
Find help articles that talk about billing refunds—about 10 results, and include id, title, and full body text.Step 4 — Same search in SQL (for apps and agents)
Run the same kind of search in SQL: strongest matches first, with id, title, body, and a relevance score—10 rows.Who uses this
- Support knowledge bases with large article corpora.
- Internal apps that previously scanned text columns with pattern-only filters.
- Agents returning ranked rows plus relevance metadata from one query path.