feat: Add full text search over chat messages (#27126)

Closes CODAGT-721
Closes CODAGT-722
Closes CODAGT-723
Closes CODAGT-724
Closes CODAGT-725

This PR adds the database and API pieces necessary to support full-text
chat message search.

- Adds required chat schema for full-text search
- Adds dbpurge job to populate search_tsv in the background
- Adds `search` parameter to GetChats query
- Adds `search` filter to `searchquery.Chats`
- Wires chat search filter into chats API

> Implemented by Coder Agents, reviewed and tested by a human.
This commit is contained in:
Cian Johnston
2026-07-16 15:21:57 +01:00
committed by GitHub
parent 9862f10484
commit f7481c5d08
26 changed files with 1756 additions and 35 deletions
+3
View File
@@ -316,6 +316,9 @@ coderd_db_tx_duration_seconds{success="",tx_id=""} 0
# HELP coderd_db_tx_executions_count Total count of transactions executed. 'retries' is expected to be 0 for a successful transaction.
# TYPE coderd_db_tx_executions_count counter
coderd_db_tx_executions_count{success="",retries="",tx_id=""} 0
# HELP coderd_dbpurge_chat_search_rows_backfilled_total Total number of chat message rows whose search_tsv was backfilled.
# TYPE coderd_dbpurge_chat_search_rows_backfilled_total counter
coderd_dbpurge_chat_search_rows_backfilled_total 0
# HELP coderd_dbpurge_iteration_duration_seconds Duration of each dbpurge iteration in seconds.
# TYPE coderd_dbpurge_iteration_duration_seconds histogram
coderd_dbpurge_iteration_duration_seconds{success=""} 0