Fuzzy Searching

Hi,

I am trying to make a fuzzy search implementation, that will read some data in JSON format and then the function will search for results according to the input string.

So basically I am thinking to use an event listener for each key that is pressed down in the input field, and then use some library for the search part, and then print the results in a dropdown.

So far I have used the fuse.js library but the think is that due to big number of the search data, each time I press a keydown it has big delay in order to find the result and it seems like a very bad user experience.

Are there any alternative ways in order to do it?

Maybe there is a way to load the JSON file into the browser memory so it will search it faster?

How big is this JSON file?

it is about 60k objects.

Shouldnt be that slow then unless the fuzzy logic is extremely complex, the objects are disastrously large, or it’s trying to do Relevance ordering.

I think the logic is ok, because I have used the script in the past, with a lot smaller data though.

I use fuse.js, have you tried it?

Also the objects are not large, they have about 5-10 properties.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.