Documentation
¶
Overview ¶
gorm-fts example: side-by-side pattern for combining gorm-managed schema with FTS5 full-text search. gorm owns the canonical Articles table; the fts.Index lives next to it in external-content mode so it stays compact (only the inverted index, no duplicated text). Search returns rowids; gorm fetches the full rows.
External-content tables do not auto-sync on writes; this example calls Rebuild() after the initial Create batch. For continuous syncing, install AFTER INSERT/UPDATE/DELETE triggers per the FTS5 docs section 4.4.3.
Click to show internal directories.
Click to hide internal directories.