mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +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);
|
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
|
||||||
|
|||||||
@@ -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`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user