Replies: 1 comment
-
I would recommend you first transform your search list, separating the names into individual properties: const list = [
{ first: 'tomasz', lastName: 'wozniak' },
{ first: 'dominik', lastName: 'wozniak' }
]; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm having trouble tuning the search parameters. I'm trying to replace the search function in Topola Viewer with fuse.js. The search is over people's names. I tried indexing a person's name as
'firstname lastname'
and['firstname', 'lastname']
and both lead to unexpected results. Ideally, I wanted to be able to search for name prefixes, e.g. searching fortom woz
would matchtomasz wozniak
.See this code sample for my examples: https://stackblitz.com/edit/typescript-y8hfkk?file=index.ts
In short, case 1 indexes:
and the search for
tom wozniak
matches dominik wozniak first.Case 2 indexes:
and the search for
tom wozniak
matches igor wozniak first.Please help me tweak the indexing and search options. Or am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions