8 Commits

Author SHA1 Message Date
perfectra1n
bb8e5ebd4a fix(fts): fix suggestions from elian 2025-11-28 21:25:24 -08:00
perf3ct
10988095c2
feat(search): get the correct comparison and rice out the fts5 search
Some checks failed
Checks / main (push) Has been cancelled
2025-10-27 14:37:44 -07:00
perf3ct
1db4971da6
feat(search): implement FST5 w/ sqlite for faster and better searching
feat(search): don't limit the number of blobs to put in virtual tables

fix(search): improve FTS triggers to handle all SQL operations correctly

The root cause of FTS index issues during import was that database triggers
weren't properly handling all SQL operations, particularly upsert operations
(INSERT ... ON CONFLICT ... DO UPDATE) that are commonly used during imports.

Key improvements:
- Fixed INSERT trigger to handle INSERT OR REPLACE operations
- Updated UPDATE trigger to fire on ANY change (not just specific columns)
- Improved blob triggers to use INSERT OR REPLACE for atomic updates
- Added proper handling for notes created before their blobs (import scenario)
- Added triggers for protection state changes
- All triggers now use LEFT JOIN to handle missing blobs gracefully

This ensures the FTS index stays synchronized even when:
- Entity events are disabled during import
- Notes are re-imported (upsert operations)
- Blobs are deduplicated across notes
- Notes are created before their content blobs

The solution works entirely at the database level through triggers,
removing the need for application-level workarounds.

fix(search): consolidate FTS trigger fixes into migration 234

- Merged improved trigger logic from migration 235 into 234
- Deleted unnecessary migration 235 since DB version is still 234
- Ensures triggers handle all SQL operations (INSERT OR REPLACE, upserts)
- Fixes FTS indexing for imported notes by handling missing blobs
- Schema.sql and migration 234 now have identical trigger implementations
2025-08-30 20:39:40 +00:00
perf3ct
41906abaf9
feat(route): allow for routes to handle their own response 2025-06-09 00:08:06 +00:00
Elian Doran
3b6679a744
refactor(serve): solve some more type errors 2025-05-21 16:00:57 +03:00
Elian Doran
a333f8a59a
fix(server): async routes causing transaction issues 2025-05-14 22:58:53 +03:00
Elian Doran
c8ace1e0b2
refactor(server): use separate method for async route 2025-05-14 22:30:02 +03:00
Elian Doran
6f3339211c
refactor(server): separate routes from route API 2025-05-14 22:11:30 +03:00