fix: update database with 499 workflow templates and working FTS5 index
- Database now contains 499 templates (was 399) - FTS5 index properly populated with all template entries - Fixed quote escaping in FTS5 queries to prevent syntax errors - Verified FTS5 search returns correct results (162 for "webhook") - Fixes template search in Docker deployments The previous database had empty FTS5 tables causing search to fail. This update ensures the FTS5 index is properly synchronized and handles special characters in search queries. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
BIN
data/nodes.db
BIN
data/nodes.db
Binary file not shown.
@@ -192,8 +192,12 @@ export class TemplateRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Use FTS for search
|
// Use FTS for search - escape quotes in terms
|
||||||
const ftsQuery = query.split(' ').map(term => `"${term}"`).join(' OR ');
|
const ftsQuery = query.split(' ').map(term => {
|
||||||
|
// Escape double quotes by replacing with two double quotes
|
||||||
|
const escaped = term.replace(/"/g, '""');
|
||||||
|
return `"${escaped}"`;
|
||||||
|
}).join(' OR ');
|
||||||
logger.debug(`FTS5 query: ${ftsQuery}`);
|
logger.debug(`FTS5 query: ${ftsQuery}`);
|
||||||
|
|
||||||
const results = this.db.prepare(`
|
const results = this.db.prepare(`
|
||||||
|
|||||||
Reference in New Issue
Block a user