Tokenize fuzzy search for emoji

This commit is contained in:
Ken Powers 2019-06-25 18:40:04 -04:00 committed by Scott Nonnenberg
parent 27e9c5fb1d
commit 45f2bef8fe

View file

@ -167,11 +167,11 @@ export function getImagePath(
const fuse = new Fuse(data, {
shouldSort: true,
threshold: 0.3,
location: 4,
distance: 10,
threshold: 0.2,
maxPatternLength: 32,
minMatchCharLength: 1,
tokenize: true,
tokenSeparator: /[-_\s]+/,
keys: ['name', 'short_name', 'short_names'],
});