ADR-0009 — Search as a derived index: Postgres FTS → OpenSearch

V1 Freeze (2026-06-12): Accepted (tiered). Postgres-FTS (name/metadata search) is V1. OpenSearch (content search) is deferred to P3 behind the same query API.

Context

BitVault needs search. The brief lists OpenSearch. But v1 search is over names and metadata/tags — which Postgres does well. OpenSearch is the heaviest, least- justified dependency for that scope (a JVM cluster to search filenames) and clashes with the tiered-dependency goal (Ledger, ADR-0012). Full-text search inside document contents is the only feature that truly justifies OpenSearch, and it is a later capability (FR E3). Any search index is derived and will drift from the source of truth (R7).

Decision

Consequences

Positive

Negative / costs

Alternatives considered