You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve critical FTS indexing and search bugs
This commit fixes multiple critical bugs that prevented full-text search
from working properly:
1. **Wrong IndexAsync signature** (ContentStorageService.cs)
- Was calling legacy 2-param IndexAsync(contentId, content)
- Now properly calls 4-param IndexAsync(contentId, title, desc, content)
- This ensures title and description fields are indexed for search
2. **Incorrect phrase search syntax** (NodeSearchService.cs)
- Phrase searches now use "phrase" instead of field:"phrase"
- Single-word searches use field:term syntax
- Fixes FTS5 compatibility issues with multi-word queries
3. **SQLite connections not disposed** (ContentService.cs + Commands)
- Made ContentService IDisposable to properly close FTS connections
- Updated all CLI commands to use 'using' statements
- Ensures writes are flushed before process exits
4. **Force synchronous writes** (SqliteFtsIndex.cs)
- Added PRAGMA synchronous=FULL for immediate persistence
- Added WAL checkpoint on disposal to flush pending writes
- Prevents data loss in short-lived CLI processes
All search functionality now working correctly with proper FTS indexing
of title, description, and content fields.
🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)
Co-Authored-By: Amplifier <[email protected]>
0 commit comments