mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
feat(search): try a ground-up sqlite search approach
This commit is contained in:
@@ -61,6 +61,21 @@ async function initDbConnection() {
|
||||
PRIMARY KEY (tmpID)
|
||||
);`)
|
||||
|
||||
// Register SQLite search functions after database is ready
|
||||
try {
|
||||
const { getSqliteFunctionsService } = await import("./search/sqlite_functions.js");
|
||||
const functionsService = getSqliteFunctionsService();
|
||||
const db = sql.getDbConnection();
|
||||
|
||||
if (functionsService.registerFunctions(db)) {
|
||||
log.info("SQLite search functions registered successfully");
|
||||
} else {
|
||||
log.info("SQLite search functions registration skipped (already registered)");
|
||||
}
|
||||
} catch (error) {
|
||||
log.error(`Failed to register SQLite search functions: ${error}`);
|
||||
}
|
||||
|
||||
dbReady.resolve();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user