mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
fix(search): resolve compilation issue due to performance log in new search
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user