fix(search): resolve compilation issue due to performance log in new search

This commit is contained in:
perf3ct
2025-11-03 12:04:00 -08:00
parent 321752ac18
commit 16912e606e
2 changed files with 10 additions and 2 deletions

View File

@@ -1254,6 +1254,15 @@ describe('searchWithLike - Substring Search with LIKE Queries', () => {
const tooLongToken = 'x'.repeat(1500); const tooLongToken = 'x'.repeat(1500);
expect(() => {
ftsSearchService.searchWithLike(
[tooLongToken],
'*=*',
undefined,
{}
);
}).toThrow();
try { try {
ftsSearchService.searchWithLike( ftsSearchService.searchWithLike(
[tooLongToken], [tooLongToken],
@@ -1261,7 +1270,6 @@ describe('searchWithLike - Substring Search with LIKE Queries', () => {
undefined, undefined,
{} {}
); );
fail('Should have thrown error');
} catch (error: any) { } catch (error: any) {
expect(error.message).toContain('xxx...'); // Truncated to 50 chars expect(error.message).toContain('xxx...'); // Truncated to 50 chars
expect(error.message).not.toContain('x'.repeat(1500)); // Not full token expect(error.message).not.toContain('x'.repeat(1500)); // Not full token

View File

@@ -259,7 +259,7 @@ class FTSSearchService {
`); `);
if (totalInFts < totalNotes) { 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 { } else {
log.info(`[FTS-DIAGNOSTICS] FTS index complete: ${totalInFts} notes indexed`); log.info(`[FTS-DIAGNOSTICS] FTS index complete: ${totalInFts} notes indexed`);
} }