diff --git a/apps/server/src/services/search/fts_search.test.ts b/apps/server/src/services/search/fts_search.test.ts index 6657d40c1..ff3955a3e 100644 --- a/apps/server/src/services/search/fts_search.test.ts +++ b/apps/server/src/services/search/fts_search.test.ts @@ -1254,6 +1254,15 @@ describe('searchWithLike - Substring Search with LIKE Queries', () => { const tooLongToken = 'x'.repeat(1500); + expect(() => { + ftsSearchService.searchWithLike( + [tooLongToken], + '*=*', + undefined, + {} + ); + }).toThrow(); + try { ftsSearchService.searchWithLike( [tooLongToken], @@ -1261,7 +1270,6 @@ describe('searchWithLike - Substring Search with LIKE Queries', () => { undefined, {} ); - fail('Should have thrown error'); } catch (error: any) { expect(error.message).toContain('xxx...'); // Truncated to 50 chars expect(error.message).not.toContain('x'.repeat(1500)); // Not full token diff --git a/apps/server/src/services/search/fts_search.ts b/apps/server/src/services/search/fts_search.ts index c2d11251b..1541bdd4b 100644 --- a/apps/server/src/services/search/fts_search.ts +++ b/apps/server/src/services/search/fts_search.ts @@ -259,7 +259,7 @@ class FTSSearchService { `); if (totalInFts < totalNotes) { - log.warn(`[FTS-DIAGNOSTICS] FTS index incomplete: ${totalInFts} indexed out of ${totalNotes} total notes. Run syncMissingNotes().`); + log.info(`[FTS-DIAGNOSTICS] FTS index incomplete: ${totalInFts} indexed out of ${totalNotes} total notes. Run syncMissingNotes().`); } else { log.info(`[FTS-DIAGNOSTICS] FTS index complete: ${totalInFts} notes indexed`); }