mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-26 23:46:23 +00:00
search tokenizer optimalization
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -216,9 +216,7 @@
|
||||
}}
|
||||
/>
|
||||
<CloseSearchButton bind:filter />
|
||||
{#if filter}
|
||||
<DropDownButton icon="icon filter" menu={createSearchMenu} />
|
||||
{/if}
|
||||
<DropDownButton icon="icon filter" menu={createSearchMenu} />
|
||||
{#if !filter}
|
||||
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user