Skip to content

MiniSearch fallback strategy for better-sqlite3 FTS #23

Description

@themightychris

The read-api plan calls out a MiniSearch fallback when better-sqlite3 (native bindings) is unavailable on a deploy target. The current implementation in apps/api/src/store/fts.ts only uses better-sqlite3; the fallback was not built, on the grounds that surfacing a clear error at boot is better than silently degrading to a less powerful search backend.

Decision needed:

  • Confirm "surface the error" is the right policy long-term (cheaper to ensure native deps build on every target than to maintain two engines)
  • Or implement a MiniSearch fallback behind the same FtsEngine interface and gate it on a flag (e.g. an env var or a runtime probe)

Relevant files:

  • apps/api/src/store/fts.ts — current engine
  • plans/read-api.md — risk note
  • specs/architecture.md — "Full-text search — in-memory SQLite FTS5 (or MiniSearch fallback)"

Originated from PR #22 (read-api).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions