feat(fts): backfill search_vector for all existing documents (V35)
Some checks failed
CI / Unit & Component Tests (push) Failing after 2s
CI / Backend Unit Tests (push) Failing after 1s
CI / Unit & Component Tests (pull_request) Failing after 2s
CI / Backend Unit Tests (pull_request) Failing after 3s

Fires the BEFORE UPDATE trigger for every documents row, which recomputes
the tsvector from all currently-linked metadata, blocks, receivers, and tags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-14 23:47:45 +02:00
parent 349f74d39a
commit 3421f3203c

View File

@@ -0,0 +1,6 @@
-- Backfill search_vector for all existing documents.
-- The BEFORE UPDATE trigger (trg_documents_fts, installed by V34) recomputes
-- the full vector from title, summary, transcription blocks, sender/receiver
-- names, tags, and location. At backfill time all join tables already contain
-- data, so "SET title = title" is sufficient to fire the trigger for every row.
UPDATE documents SET title = title;