Context
0049 defined@stackra/search as a driver interface with a Postgres driver first, and kept Meilisearch and OpenSearch deferred under 0011. The Figentra OS search package is a stub, so the owner chose to write the package fresh. The engine drivers are now Pro (0077), and indexing runs on the queue (0078).
Decision
@stackra/searchis written fresh: contracts, the driver pattern (a default driver and named instances), and one conformance suite.- The free driver is Postgres, using
pg_trgmand full-text search. - Meilisearch and OpenSearch drivers are Pro (
@stackra-pro/*). They are not built in this repository. Typesense is not planned. - Indexing is event-driven through queue jobs. A searchable model’s events enqueue indexing jobs. Services never write an index directly.
- Every driver passes the conformance suite, including the Pro drivers.
- Every query is scoped by tenant (0088).
Consequences
- Free deployments, including air-gapped ones, search on Postgres alone.
- When accepted, the dedicated-search row of 0011 changes: Meilisearch and OpenSearch become permitted as Pro drivers only, never as a free dependency. 0011 is Accepted, so that row changes by a superseding edit when this ADR is accepted.
- Eventual consistency between a write and its appearance in search.
Enforcement
Planned: the conformance suite in the package’s__tests__, and FORBIDDEN_DEPENDENCIES entries for meilisearch and @opensearch-project/opensearch in members of this repository. Nothing is implemented yet.