Tune emoji search
This commit is contained in:
parent
3a46f4c9a2
commit
f4cb1194c6
1 changed files with 4 additions and 4 deletions
|
@ -131,15 +131,15 @@ export function getSheetCoordinates(
|
||||||
const fuse = new Fuse(data, {
|
const fuse = new Fuse(data, {
|
||||||
shouldSort: true,
|
shouldSort: true,
|
||||||
threshold: 0.3,
|
threshold: 0.3,
|
||||||
location: 0,
|
location: 4,
|
||||||
distance: 5,
|
distance: 10,
|
||||||
maxPatternLength: 20,
|
maxPatternLength: 32,
|
||||||
minMatchCharLength: 1,
|
minMatchCharLength: 1,
|
||||||
keys: ['name', 'short_name', 'short_names'],
|
keys: ['name', 'short_name', 'short_names'],
|
||||||
});
|
});
|
||||||
|
|
||||||
export function search(query: string) {
|
export function search(query: string) {
|
||||||
return fuse.search(query);
|
return fuse.search(query.substr(0, 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
const shortNames = new Set([
|
const shortNames = new Set([
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue