search tokenizer optimalization

This commit is contained in:
SPRINX0\prochazka
2024-12-17 10:09:52 +01:00
parent 7759fd862f
commit 2a5fdd852a
2 changed files with 8 additions and 4 deletions

View File

@@ -129,7 +129,13 @@ export function tokenizeBySearchFilter(text: string, filter: string): { text: st
res = nextres;
}
return res.filter(x => x.text.length > 0);
res = res.filter(x => x.text.length > 0);
if (res.length == 1 && !res[0].isMatch) {
return null;
}
return res;
// const result = [];
// let lastMatch = 0;