Files
outline/plugins/search-postgres/server
Tom MoorandClaude Fable 5 2414bb3a84 perf: Search queries (#13293)
* perf: Add team-scoped composite index for document search

The global tsvector GIN index scanned matches across all teams before
filtering by teamId. A composite (teamId, searchVector) index via
btree_gin confines the scan to a single team's documents.

* fix: Bound search queries with the request statement timeout

Search queries ran outside a transaction and so never received the
SET LOCAL statement_timeout applied to request-handling processes,
leaving cancelled requests running unbounded on the database.

* Bind queries to read-only replica where available

* Remove readOnly option for now

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 22:26:45 -04:00
..