mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 19:43:58 +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;
|
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 = [];
|
// const result = [];
|
||||||
// let lastMatch = 0;
|
// let lastMatch = 0;
|
||||||
|
|||||||
@@ -216,9 +216,7 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<CloseSearchButton bind:filter />
|
<CloseSearchButton bind:filter />
|
||||||
{#if filter}
|
|
||||||
<DropDownButton icon="icon filter" menu={createSearchMenu} />
|
<DropDownButton icon="icon filter" menu={createSearchMenu} />
|
||||||
{/if}
|
|
||||||
{#if !filter}
|
{#if !filter}
|
||||||
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
|
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user